Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

com

link errors in visual c++ 6.0 in anything i program

This topic is 5720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I keep getting link errors in anything i program, even a simple hello world program so i figure it must be my compiler. Can anyone help? LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.

Share this post


Link to post
Share on other sites
Advertisement
My guess is that you probably forgot to include the necessary library files (.lib) in your project file.

What compiler are you using?

Missing or out of date include files may also be the culprit.

Hope that helps. Try being a little more specific and I can probably help you get your code to build.

-Q

"Things could get ugly."
- The Genie (Return of Jafar) (don''t ask me why I thought of this)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
project->settings->link tab->project options control:

make sure the /subsystem setting is console, not windows.

Share this post


Link to post
Share on other sites
ah thx guys, my bad ive been so ust to windows programming that i forgot for a console appliaction u need to use a console application

Share this post


Link to post
Share on other sites
great the error is back again and im programming in a console application.
libcd.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Accounting Application.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Share this post


Link to post
Share on other sites
You don''t use WinMain() for a console app. Just main().

Also, like I said earlier, make sure you have included all the necessary .lib files in your project, and also make sure that you have all the updated .dlls. I have gotten this same error before and it was because I either didn''t have:
a.) The correct .h file in my compiler include directory (or project directory)
b.) The necessary .lib files included with my project
c.) The necessary .dll files installed on my system

Hope that helps you track down your problem.

-Q

Share this post


Link to post
Share on other sites
I assume you''re using MS Visual C++. Delete all the project/workspace files (keep all your .h and .cpp files obviously). Create a new project, and when it asks you what type make sure you pick ''Win32 Console Application'' not ''Win32 Application.'' Add all your old .h and .cpp files to the project and build the exe.

Share this post


Link to post
Share on other sites
i did only use main() , and i have checked over and over to see if i have all the lib and include files although im not so sure about the dlls. ill have a little try with Dobbs idea.

Share this post


Link to post
Share on other sites
ah works after i removed the project files and put the source into the new project. thx

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!