Board index » cppbuilder » analysing a linker error message

analysing a linker error message


2003-10-23 06:10:45 AM
cppbuilder16
Dear mates,
Please state the possible causes of the following linker error message:
Unresolved external 'WinMain' referenced from E:\BORLAND\BCC55\LIB\C0W32.OBJ
given that compiler option -tW is applied.
Version info:
BCC32 : Borland C++ 5.5.1 for win32
ILINK32 : Turbo Incremental Link 5.00
MAKE : Version 5.2
Thanks.
//rk
 
 

Re:analysing a linker error message

R K wrote:
Quote
Please state the possible causes of the following linker error message:
Unresolved external 'WinMain' referenced from E:\BORLAND\BCC55\LIB\C0W32.OBJ
given that compiler option -tW is applied.
2 possables:
1) You are writting a console app that starts at main() and meant to
use -tWC.
2) You are writting a GUI app that needs to start at WinMain() instead
of main().
Console apps use c0x32 and start at main().
Gui apps use c0w32 and start at WinMain().
 

Re:analysing a linker error message

Along with what Mr Gonder has mentioned, there is another thing which I
think could cause that:
Functions have a certain signature. If the WinMain that you gave did not
match the function prototype then it would be taken as a different function
which did not satisfy the requirement.
The signature is:
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
If WINAPI were missing, the argument list different or the return type
different, it may not have been taken as the required WinMain.
If what Mr Gonder has said and what I have said fail to fix the problem,
then please post the exact command line used to call the linker including
the contents of any response file that may have been used.
. Ed
Quote
R K wrote in message
news:3f970065$ XXXX@XXXXX.COM ...

Please state the possible causes of the following linker
error message: Unresolved external 'WinMain' referenced
from E:\BORLAND\BCC55\LIB\C0W32.OBJ
given that compiler option -tW is applied.

Version info:
BCC32 : Borland C++ 5.5.1 for win32
ILINK32 : Turbo Incremental Link 5.00
MAKE : Version 5.2
 

{smallsort}