linker error

K

kath.neumann

Hi,

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"

my code (Borland C++ builder 5) is as follows:


#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop

//---------------------------------------------------------------------------
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}


Any idea?

THANKS!

kath
 
V

Victor Bazarov

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"

my code (Borland C++ builder 5) is as follows:


#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop

//---------------------------------------------------------------------------
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}


Any idea?

Unfortunately, yes. You're building this as a Windows application.
If so, then your application doesn't start in 'main', it has to start
in 'WinMain', which you don't have and that's what the linker is
complaining about. MS Windows programming is not the same as just
plain programming. That's why you probably want to set aside the
"Windows" side of things for now and switch to creating what is known
as "Console Applications". See appropriate settings described in the
help system for your compiler. Or ask in the newsgroup dedicated to
your compiler (see the 'borland.public.*' hierarchy).

V
 
N

Neelesh Bodas

Hi,

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"

my code (Borland C++ builder 5) is as follows:

#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop

//-------------------------------------------------------------------------­--
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;

}
Any idea?

Use some standard-compliant compiler. Typical options are g++(linux),
devc++(windows), but I am sure there are other options too.
Alternatively, lookup the documentation specific to your compiler.
Many compilers need a specific entry-function, for a given platform.
eg winMain for windows platform. But note that doing so will make your
program non-standard and hence non-portable.

-N
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

Hi,

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"

my code (Borland C++ builder 5) is as follows:


#include <condefs.h>

Non-standard header, and not used, skip it.
#include <iostream.h>

Old header, nowadays all standard headers are included without the .h
suffix said:
#include <conio.h>

Non-standard, it's generally a good idea to stay away from such headers
while learning C++, since it reduces the changes of learning any bad habits.
#pragma hdrstop

Non-standard and I don't know what it does. Keep it if you think it's
useful, but considering the name of the pragma it's probably something
that should be used in header-files.
//---------------------------------------------------------------------------
int main (int argc, char **argv)

Unless you actually parse the command line arguments I would recommend
to use the simpler form: int main().
{
cout << "Hello World!" << endl;

This should give you a compiler error, cout is not defined. Either
include the namespace (std::cout << ...) or put 'using namespace std;'
above the main-function. I prefer the first but that's just me.
cout << endl << "press any key to continue...";
Ditto.

getch();

If used just to prevent the console from closing as soon as the program
is done, I think it's better to use std::cin.get() which will require
you to press enter. If you use this you can get rid of the include for
conio.h also.
return 0;
}


Any idea?

You have probably specified it as a windows GUI program when you created
the project (or whatever Borland calls it), you need to specify it as a
native win32 project.

By the way, it seems to me that Borland C++ Builder 5 is quite old by
now, at least one newer version is out and you might want to consider
upgrading. If cost is an issue there are free alternatives, both Visual
C++ 2005 from MS and DevC++ (which comes with gcc).
 
A

Alf P. Steinbach

* Victor Bazarov:
I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"

my code (Borland C++ builder 5) is as follows:


#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop

//---------------------------------------------------------------------------
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}


Any idea?

Unfortunately, yes. You're building this as a Windows application.

You mean a Windows GUI subsystem application.

If so, then your application doesn't start in 'main', it has to start
in 'WinMain',

That's a common misconception. Both Visual C++ and g++ supports
standard "main" for GUI subsystem application, and I haven't heard of
any compiler that doesn't. g++ supports standard "main" by default,
Visual C++ supports standard "main" when using appropriate switches (by
default Visual C++ is also non-standard-conforming wrt. exceptions, RTTI
and for-loop syntax, so it must be browbeaten into submission).

which you don't have and that's what the linker is
complaining about. MS Windows programming is not the same as just
plain programming. That's why you probably want to set aside the
"Windows" side of things for now and switch to creating what is known
as "Console Applications".

Good advice.

I'd add: use command line tools for building.

An IDE adds too much "helpful" stuff that just gets in the way.

See appropriate settings described in the
help system for your compiler. Or ask in the newsgroup dedicated to
your compiler (see the 'borland.public.*' hierarchy).

Yeah.

Cheers,

- Alf
 
K

kath.neumann

* Victor Bazarov:


I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"
my code (Borland C++ builder 5) is as follows:
#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop
//---------------------------------------------------------------------------
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}
Any idea?
Unfortunately, yes. You're building this as a Windows application.

You mean a Windows GUI subsystem application.
If so, then your application doesn't start in 'main', it has to start
in 'WinMain',

That's a common misconception. Both Visual C++ and g++ supports
standard "main" for GUI subsystem application, and I haven't heard of
any compiler that doesn't. g++ supports standard "main" by default,
Visual C++ supports standard "main" when using appropriate switches (by
default Visual C++ is also non-standard-conforming wrt. exceptions, RTTI
and for-loop syntax, so it must be browbeaten into submission).
which you don't have and that's what the linker is
complaining about. MS Windows programming is not the same as just
plain programming. That's why you probably want to set aside the
"Windows" side of things for now and switch to creating what is known
as "Console Applications".

Good advice.

I'd add: use command line tools for building.

An IDE adds too much "helpful" stuff that just gets in the way.
See appropriate settings described in the
help system for your compiler. Or ask in the newsgroup dedicated to
your compiler (see the 'borland.public.*' hierarchy).

Yeah.

Cheers,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Hi Alf,
it is running now, thanks for your help :)
Cheers,
Kathleen
 
K

kath.neumann

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"
my code (Borland C++ builder 5) is as follows:
#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop
//-------------------------------------------------------------------------­--
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}
Any idea?

Use some standard-compliant compiler. Typical options are g++(linux),
devc++(windows), but I am sure there are other options too.
Alternatively, lookup the documentation specific to your compiler.
Many compilers need a specific entry-function, for a given platform.
eg winMain for windows platform. But note that doing so will make your
program non-standard and hence non-portable.

-N

Hi,
thanks, it is running now :)
thanks for your recommendations on compiler, I'll check that soon!
Cheers,
Kathleen
 
K

kath.neumann

I just started to get a grip on C++ and and went through the tutorial.
However, not even the standard "hello world" exercise works out :( I
do get a linker error "[Linker Error] Unresolved external 'WinMain'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ"
my code (Borland C++ builder 5) is as follows:
#include <condefs.h>
#include <iostream.h>
#include <conio.h>
#pragma hdrstop
//---------------------------------------------------------------------------
int main (int argc, char **argv)
{
cout << "Hello World!" << endl;
cout << endl << "press any key to continue...";
getch();
return 0;
}
Any idea?

Unfortunately, yes. You're building this as a Windows application.
If so, then your application doesn't start in 'main', it has to start
in 'WinMain', which you don't have and that's what the linker is
complaining about. MS Windows programming is not the same as just
plain programming. That's why you probably want to set aside the
"Windows" side of things for now and switch to creating what is known
as "Console Applications". See appropriate settings described in the
help system for your compiler. Or ask in the newsgroup dedicated to
your compiler (see the 'borland.public.*' hierarchy).

V

Hi Victor,
it is running now, thanks for your help!!! I created it as console
application, that was indeed the reason. thanks for this tip :)
Cheers,
Kathleen
 
B

BobR

Hi,
thanks, it is running now :)
thanks for your recommendations on compiler, I'll check that soon!
Cheers, Kathleen

FYI: Dev-C++ is not a compiler, it is an IDE. There is an option to download
a Dev-C++ package that contains the GNU GCC(MinGW) compiler.

Dev-C++ IDE: http://www.bloodshed.net/

--
Bob R
POVrookie
- -
MinGW (GNU compiler): http://www.mingw.org/
MinGWStudio http://www.parinyasoft.com/ (GNU/Linux & window$)
wxWidgets URL: http://www.wxwidgets.org
Code::Blocks http://www.codeblocks.org/
 
J

James Kanze

* Victor Bazarov:

[...]
g++ supports standard "main" by default,
Visual C++ supports standard "main" when using appropriate switches (by
default Visual C++ is also non-standard-conforming wrt. exceptions, RTTI
and for-loop syntax, so it must be browbeaten into submission).

Aren't they all? You need -std=c++98 -pedantic with g++, and
God knows how many options with Sun CC. Add to that the fact
that pure C++ compliance locks you out of a lot of Posix, and
what's a programmer to do?
Good advice.

I know this is off topic, but the issue comes up so often: what
the hell is a "console application"? How does it differ from
any other application, other than, perhaps, it doesn't use
certain libraries? (In which case, of course, you don't need to
click anything. Just don't include the appropriate headers, nor
link against the corresponding library.)

Unless I've misunderstood something greatly, in the end, an
application is an application. If it invokes some system
function which opens a window, and plays around in it, then it
is a GUI (or Windowing) application, but that's a result of the
code the programmer wrote, and nothing else. The applications I
write don't normally do this: are they automatically console
applications (even if they are started by a cronjob, or at
system start-up, with cin, cout and cerr connected to
"/dev/null")?
I'd add: use command line tools for building.

Is there any other way? All the IDE's that I know (admittedly,
NOT Visual Studio) do is generate command lines.
An IDE adds too much "helpful" stuff that just gets in the way.

:) Boy can I agree with you there.

At least for production code. I can imagine that when learning,
"one thing at a time" is not a bad policy, and if you could find
an IDE which actually worked correctly and usefully, it would be
nice. But professionally, never.
 
J

James Kanze

On Jul 23, 8:40 pm, (e-mail address removed) wrote:
Use some standard-compliant compiler. Typical options are g++(linux),
devc++(windows), but I am sure there are other options too.

Watch it. I have no idea what devc++ is, but g++ is not
standards compliant, by a long shot. "g++ -std=c++98 -pedantic"
tries to be, up to a certain point, but even it ignores some
major features of C++ (like export).
 
V

Victor Bazarov

James said:
[..]
I know this is off topic, but the issue comes up so often: what
the hell is a "console application"? How does it differ from
any other application, other than, perhaps, it doesn't use
certain libraries? (In which case, of course, you don't need to
click anything. Just don't include the appropriate headers, nor
link against the corresponding library.)

It's specific to Windows OS, and how the hosting environment tries
to provide (or exclude) certain features we're so used to in some
other environs. E.g., even if you start a "normal" Windows app
from the command line, no output is going to appear. 'std::cout'
and 'std::cerr' are essentially "black holes". Same for the input
'std::cin', it just doesn't exist in a "normal" Windows app. In
order to have those elements, the app has to "create a console"
(in Windowese) and connect it to the standard I/O streams. In
a "console application" this is done automatically.
Unless I've misunderstood something greatly, in the end, an
application is an application.

Actually, a Windows application is not an application at all.
It's a dynamically loaded library (DLL). It cannot execute
without many other things from the system (compared to some true
executables in some systems that contain all the code necessary
to be run, except for BIOS, maybe).
If it invokes some system
function which opens a window, and plays around in it, then it
is a GUI (or Windowing) application, but that's a result of the
code the programmer wrote, and nothing else. The applications I
write don't normally do this: are they automatically console
applications (even if they are started by a cronjob, or at
system start-up, with cin, cout and cerr connected to
"/dev/null")?

No, they are not.

Is the application start point called "main" or "WinMain" in the
apps you write? What subsystem do you tell the linker to use?
If you don't tell, what does it use by default?

MS Windows can be viewed as a bit more sophisticated than other
systems we've encountered just for having those "subsystems".
I don't really care much about digging too deep into them, and
use "console" for "command-line I/O" and "windows" for the rest.
They do differ a bit in the ways to acquire the command-line args,
for example. But beyond that it doesn't matter for what most
folks do. Unless it does, of course, and then they learn about
those things.
Is there any other way? All the IDE's that I know (admittedly,
NOT Visual Studio) do is generate command lines.

VS does invoke the compiler with some command line, as well,
and captures its output, and then displays it in a window. Nothing
out of the "ordinary". It does have plenty of other tools to help
set up a project and navigate the source, and... But that's all
it does.
:) Boy can I agree with you there.

At least for production code. I can imagine that when learning,
"one thing at a time" is not a bad policy, and if you could find
an IDE which actually worked correctly and usefully, it would be
nice. But professionally, never.

Never say "never". Then again, I've known people who never flew
on a plane or used a computer or a wireless phone...

V
 
A

Alf P. Steinbach

* Victor Bazarov:
James said:
[..]
I know this is off topic, but the issue comes up so often: what
the hell is a "console application"? How does it differ from
any other application, other than, perhaps, it doesn't use
certain libraries? (In which case, of course, you don't need to
click anything. Just don't include the appropriate headers, nor
link against the corresponding library.)

It's specific to Windows OS, and how the hosting environment tries
to provide (or exclude) certain features we're so used to in some
other environs. E.g., even if you start a "normal" Windows app
from the command line, no output is going to appear. 'std::cout'
and 'std::cerr' are essentially "black holes". Same for the input
'std::cin', it just doesn't exist in a "normal" Windows app. In
order to have those elements, the app has to "create a console"
(in Windowese) and connect it to the standard I/O streams. In
a "console application" this is done automatically.
Unless I've misunderstood something greatly, in the end, an
application is an application.

Actually, a Windows application is not an application at all.
It's a dynamically loaded library (DLL). It cannot execute
without many other things from the system (compared to some true
executables in some systems that contain all the code necessary
to be run, except for BIOS, maybe).
If it invokes some system
function which opens a window, and plays around in it, then it
is a GUI (or Windowing) application, but that's a result of the
code the programmer wrote, and nothing else. The applications I
write don't normally do this: are they automatically console
applications (even if they are started by a cronjob, or at
system start-up, with cin, cout and cerr connected to
"/dev/null")?

No, they are not.

Is the application start point called "main" or "WinMain" in the
apps you write? What subsystem do you tell the linker to use?
If you don't tell, what does it use by default?

MS Windows can be viewed as a bit more sophisticated than other
systems we've encountered just for having those "subsystems".
I don't really care much about digging too deep into them, and
use "console" for "command-line I/O" and "windows" for the rest.
They do differ a bit in the ways to acquire the command-line args,
for example. But beyond that it doesn't matter for what most
folks do. Unless it does, of course, and then they learn about
those things.

Great -- the mods of clc++m go over to clc++ to off-topic a little
bit... :)

But it seems this is a stumbling block for so many C++ programmers, with
so many misconceptions floating around, some strange idea that for
Windows programming one "must" use non-standard language extensions.

So, for the record:

1 Yes, you can use standard "main" in a Windows GUI app (already
discussed in this thread).

2. Contrary to what's stated above, a Windows GUI app does have
standard input, output and error streams, i.e. yes you can use
std::cout in a Windows GUI app, e.g. for tracing.

3. Contrary to what's stated above, there's no difference between
Windows console and GUI apps in how to acquire command line
arguments.

I once wrote up the basics about this in two PDF documents.

See <url: http://home.no.net/dubjai/win32apitut/01.pdf>.
 
A

Alf P. Steinbach

* James Kanze:
* Victor Bazarov:
[...]
g++ supports standard "main" by default,
Visual C++ supports standard "main" when using appropriate switches (by
default Visual C++ is also non-standard-conforming wrt. exceptions, RTTI
and for-loop syntax, so it must be browbeaten into submission).

Aren't they all? You need -std=c++98 -pedantic with g++, and
God knows how many options with Sun CC. Add to that the fact
that pure C++ compliance locks you out of a lot of Posix, and
what's a programmer to do?
Good advice.

I know this is off topic, but the issue comes up so often: what
the hell is a "console application"?

See <url: http://home.no.net/dubjai/win32apitut/01.pdf>, written by
yours truly (ahem).

It was some time ago.

Since then (correcting information in that tutorial): Visual Studio 8.0
is now available for free, and the CodeBlocks IDE is generally
recommended instead of Bloodsheed Dev-C++.


[snip]
Unless I've misunderstood something greatly, in the end, an
application is an application. If it invokes some system
function which opens a window, and plays around in it, then it
is a GUI (or Windowing) application, but that's a result of the
code the programmer wrote, and nothing else. The applications I
write don't normally do this: are they automatically console
applications (even if they are started by a cronjob, or at
system start-up, with cin, cout and cerr connected to
"/dev/null")?

No, the difference is the specification of subsystem in the executable,
which gets different services from Windows depending on the subsystem.
The problem is that Microsoft's C++ tools treat those subsystems
differently by default, in order to cater to limitations of late 1980's
16-bit Windows. It's extremely silly.
 
J

James Kanze

James said:
[..]
I know this is off topic, but the issue comes up so often: what
the hell is a "console application"? How does it differ from
any other application, other than, perhaps, it doesn't use
certain libraries? (In which case, of course, you don't need to
click anything. Just don't include the appropriate headers, nor
link against the corresponding library.)
It's specific to Windows OS, and how the hosting environment tries
to provide (or exclude) certain features we're so used to in some
other environs.

To the OS, or to the development environment? If I look at my
Windows system, I don't see any difference between applications;
they're all .exe files, regardless of what they do. As far as I
can tell, all of the facilities of the OS are there for all
programs to use, if they want.
E.g., even if you start a "normal" Windows app
from the command line, no output is going to appear.

I'm not sure what you mean by a "normal" Windows app.
Something that isn't a console app? I just started Netscape
from a "command prompt" window (the Windows equivalent of a
terminal window, I think), and it started exactly like it does
when I click on the icon. No output appears in the terminal
window, of course, for the simple reason that netscape doesn't
output to standard out.
'std::cout'
and 'std::cerr' are essentially "black holes".

"/dev/null". Again, that's not a characteristic of the program,
but of the way it is invoked. In most of my application
software, cout and cerr are also connected to "black holes" (and
cin returns end of file immediately). Not because they do
something special, but because that's the way they're started;
they aren't started from a terminal window, but as a cronjob, or
on system startup. (I'm sorry if the terminology here is very
Unix specific, but that's what I know. I know that Windows has
the same possibilities, because I've seen them used, but I don't
know what they're called there. And also, my applications do do
a little bit special, to ensure that even if they are started
from a terminal window, they are disconneted from it, so that a
control-C in that window won't terminate them. But they can
still write to std::cerr, for example; if they program was
started from a terminal window, that's where the text ends up,
and it was started normally, the text ends up in a black hole.)
Same for the input
'std::cin', it just doesn't exist in a "normal" Windows app. In
order to have those elements, the app has to "create a console"
(in Windowese) and connect it to the standard I/O streams.

Now that can't be true. I often write little test programs in
Windows, to see what happens with VC++, and I've never created a
console in any of them. I just compile them and run them.
Almost exactly as I do under Unix (and the sources are
identical, since it is the same remote mounted file).

And that, really, is more or less what I was asking: are these
programs "console applications", or something else? And would
my real applications be "console applications" if I compiled and
ran them under Windows, or something else, even if they are
normally started automatically by the system at a certain time
each day, and they're standard output is to a black hole?
In a "console application" this is done automatically.

So what I'm writing aren't "console applications", because I've
never seen anything that automatically opened a window, without
my demanding it (by means of a special library call, which
doubtlessly at the lowest level ends up in some kind of
communication with the windowing system).
Actually, a Windows application is not an application at all.
It's a dynamically loaded library (DLL).

But it still has a .exe suffix, and can be invoked from the
command line. (Or is Netscape not a Windows application? I'm
getting more and more confused.)
It cannot execute
without many other things from the system (compared to some true
executables in some systems that contain all the code necessary
to be run, except for BIOS, maybe).

On any modern large scale system, code cannot execute without
any number of system services. The system starts the code; the
system recovers the return code, and does something with it; the
system takes care of all of the IO, memory mapping, threading,
and who knows what all else. Almost always, too, there are
additional objects which are dynamically loaded to provide
higher level services: access to Oracle or Sybase, for example.
(Under the Unix I'm familiar with, access to the basic C
standard library is normally also via a dynamically loaded
object, although you can request it be linked statically when
generating the program.)
No, they are not.

Sorry, but I DO know how my applications run.
Is the application start point called "main" or "WinMain" in the
apps you write?

"main", obviously. I'm coding in C++, and I'm not using some
third party application framework. That's also true for the
little code I write under Windows. It's C++, and I'm not using
any third party application framework.

I've vaguely heard about "WinMain", but from what little I
understand, it's basically just part of an application
framework. It's a function, rather than a class, because the
application framework is designed to support a C API, but it's
basically the same thing; the application framework contains
main somewhere, sets itself up, and then calls this other
function. But of course, you don't have to use this framework,
and you'd only use it if its services corresponded to what you
need.
What subsystem do you tell the linker to use?
If you don't tell, what does it use by default?

I usually specify about twenty different libraries (many written
in house) when I link my real application. By default, I get
libc.so and the C++ standard library (which depends on the
compiler I'm using), and nothing else---even the math functions
in standard C are missing.
MS Windows can be viewed as a bit more sophisticated than other
systems we've encountered just for having those "subsystems".

What subsystems? And what does this have to do with "console
application"? Every modern OS has a number of subsystems; I'd
say that the split was stricter (and the sophistication higher)
under Unix. (At least, every time I use Windows, I get the
impression of going back 10 or 15 years in time.)
I don't really care much about digging too deep into them, and
use "console" for "command-line I/O" and "windows" for the rest.
They do differ a bit in the ways to acquire the command-line args,
for example. But beyond that it doesn't matter for what most
folks do. Unless it does, of course, and then they learn about
those things.

If it doesn't matter, why do people here always mention it?
VS does invoke the compiler with some command line, as well,
and captures its output, and then displays it in a window. Nothing
out of the "ordinary". It does have plenty of other tools to help
set up a project and navigate the source, and... But that's all
it does.

That's my impression, and that's the way similar tools work
under Unix. In general, the OS only has one basic way to start
a program, which can be mapped more or less directly to a
command line. The more evolved tools provide a fancy interface,
but in the end, don't do anything different that what the shell
does to start the command. So at the OS level, there's no
distinction---an application is an application. (There is code
which is handled differently, for example, device drivers. But
surely you don't mean to say that anything that isn't a device
driver is a console application.)

Note that most of the above is really off topic here. And also
has very little to do with what I asked: what do posters here
mean when they use the expression "console application"? And
what else is there (except kernel code and device drivers)? As
far as I can tell, an application is an application: if it's
written in C++, we can discuss it here, and if it's not, we
shouldn't.
 
V

Victor Bazarov

James said:
[..] If I look at my
Windows system, I don't see any difference between applications;
they're all .exe files, regardless of what they do. As far as I
can tell, all of the facilities of the OS are there for all
programs to use, if they want.

If I look at my Windows desktop, they all look like tiny pictures.
As far as I can tell, there are no .exe files.
[..off topic snipped..]

MSDN is your friend (if you really want to know about Windows,
that is). It looks like you were at least curious. Well, don't
you know that there are newsgroups for those discussions? And
here is a link (courtesy of MSDN) answering at least one question
(how to distinguish between a console app and non-console app):
http://support.microsoft.com/kb/90493

V
 
J

James Kanze

James said:
[..] If I look at my
Windows system, I don't see any difference between applications;
they're all .exe files, regardless of what they do. As far as I
can tell, all of the facilities of the OS are there for all
programs to use, if they want.
If I look at my Windows desktop, they all look like tiny pictures.
As far as I can tell, there are no .exe files.

Come now. How did those icons get there? Even I know that you
can open a properties dialog, and specify the command for the
program, and I rarely use Windows.
[..off topic snipped..]
MSDN is your friend (if you really want to know about Windows,
that is). It looks like you were at least curious.

All I really wanted was a definition of a term that I'd seen
often enough here, and for which I couldn't figure out any
reasonable meaning. Alf's article filled the bill (and then
some, since I now not only know what was meant, but what I'll
have to do if I ever have to develop applications under
Windows.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top