Jump to content
  • Advertisement

Archived

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

Tempest

Linker error

This topic is 6006 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

Guys, I''m having a hard time figuring out a linker error. I started out just trying to write a program to display some text on a screen, and when I couldn''t figure that out, I tried a simple Hello World, and still didn''t work. Now I''m down to trying to get this to work: #include <iostream> int main() { return 0; } I keep getting this error: --------------------Configuration: ProgramThatWontWork - Win32 Debug-------------------- Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/ProgramThatWontWork.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ProgramThatWontWork.exe - 2 error(s), 0 warning(s) I''ve even tried to get the #include <iostream> to link by itself. I also tried it with the .h, among other things. It''s got to be something stupid I''m missing. Why shouldn''t this work? I created a new Win32 application, surely I don''t have to add anything to it to get it work, right? I figure the libraries should already be included for a program this simple. I''m using MSVC 6 Thanks

Share this post


Link to post
Share on other sites
Advertisement
Try creating a new Win32 console application. WinMain is the entry point for normal Win32 apps, and that''s what the linker is looking for. Console apps have an entry point of main(), which is exactly what you want.

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!