Click to See Complete Forum and Search --> : error LNK2001: unresolved external symbol
Nilesh Gajjar
April 22nd, 1999, 05:03 AM
when I am trying to build my Application in VC6.0; I am geting the following error at the time of Linking
Linking...
Creating library Debug/thrdlib.lib and object Debug/thrdlib.exp
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/thrdlib.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
April 22nd, 1999, 06:06 AM
This link error occurs if u haven't created the workspace using VC++ appwizard. If u have just typed in a .ccp/.c file and pressed the build button on VC++, u will be prompted with the msg "Do u want to create a default workspace". The default workspace may not have the necessary settings required giving rise to build error. The remedy is to create a suitable (Win32 console appl/MFC Exe or whatever) workspace and include ur files into the project and hten give for a compilation. Hope this will solve ur problem
Regards,
Satadal
satadbh@wipsys.soft.net
Nilesh Gajjar
April 22nd, 1999, 08:15 AM
I have tried all the possible remedies suggested by you.Still same error is coming, I think some modifications are required in Project settings, but dont know what it is.
Any way Thanks for try.
Franky Braem
April 22nd, 1999, 09:08 AM
Make a new Console Project. Then select "Empty project" in the wizard. Add your code as a new source file to this project. That should do it.
Nilesh Gajjar
April 22nd, 1999, 11:26 PM
I have tried that also, Still problem is not solved.
ceciloup
May 21st, 1999, 10:06 AM
Hi...
i have seen you problem with the unresolved symbol...
I have exactly the same error.
Did you manage to do something good about it?
:) :) :) :) :) :)
Thanks for any help...
chiuyan
May 21st, 1999, 10:18 AM
if you are building a Console App, then you need to define a main procedure. If you are wishing to build a Win32 app, then you need to create a win32 project instead of a Console project (or change the build settings on your current project)
--michael
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.