|
-
April 10th, 2004, 01:15 PM
#1
HELP with link-editing error
hi
for whatever program who's ok at compile, i get the same error at lik-editing :
--------------------Configuration: try2 - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/try2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
try2.exe - 2 error(s), 0 warning(s)
anybody can help
i just made an instalation of visual studio 6 + sp6
is there a bug ?
please help
thank you
-
April 10th, 2004, 01:58 PM
#2
the error you got is because the lack of the main function
in win32 application.
the function prototype is:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow);
if you do not intend to use winapi then create a new workspace and choose console application.
Last edited by Guysl; April 10th, 2004 at 02:01 PM.
**** **** **** **** **/**
-
April 10th, 2004, 08:28 PM
#3
but i have the main function
first of all thanks for the reply, but.........
i meant every single **** program.
got the same error on the following prog :
#include<stdio.h>
void main()
{
printf("cannot find where is the error\n");
}
u c ?
-
April 12th, 2004, 11:36 AM
#4
braileanul, you may still be encountering a problem with your project settings like Guys said. Try this, open a soure FILE with your example, it will ask you to create a project when you start to compile, do this, that should give you a clean project and should compile.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|