Linker Error... 
Author Message
 Linker Error...

Hello,

I am trying to Build a windows application in C. It compiles okay but when I
try to Build it, I get the LINK ERROR below. Please help!!!

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/HELLOWIN.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

JR



Mon, 03 Feb 2003 03:00:00 GMT  
 Linker Error...
This is a FAQ. A bit of searching on dejanews or other resources would
find the answer. But here's the solution:

Go the link tab, options edit field. Find /subsystem:console and change
it to /subsystem:windows (or remove it completely).

That tells the linker to look for WinMain() instead of main. Next time
be sure to choose "Win32 Application" or "Win32 Console Application"
more carefully.

Good luck!

Quote:

> Hello,

> I am trying to Build a windows application in C. It compiles okay but when I
> try to Build it, I get the LINK ERROR below. Please help!!!

> LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> Debug/HELLOWIN.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.

> JR

--
.Bruce Dawson, Humongous Entertainment.
http://www.humongous.com/


Mon, 03 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. linker error again: unusual fatal error LNK1104

2. linker error 2001/compiler error 2893(templates and friend clases involved)

3. Linker Error : Internal Error on Pass2

4. Friend linker error Visual C++ .NET 2003

5. Help on linker error

6. Linker error for .ctor and Finalize in managed classes

7. Namespaces generates linker errors

8. MC++ unnamed structs gives linker error

9. VC 7.0 Linker Error LNK2005, LNK4006, LNK1169 _DllMain@12 already defined in MyDll.obj

10. Linker Error LNK2001.

11. Various linker errors when compiling with /GZ

12. logging linker errors

 

 
Powered by phpBB® Forum Software