Jump to content
  • Advertisement

Archived

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

robirt

Linking Error

This topic is 5966 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 am using sdl and openGL. They are the only libraries i added besides the default ones when you create a win32 porgram. please help. This is the erroe i get: MSVCRTD.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16

Share this post


Link to post
Share on other sites
Advertisement
when you make a win32 application then the function WinMain() must be defined by you. This error indicates that you did not not do that.

Share this post


Link to post
Share on other sites
Im not defining winmain, since im using sdl. I am using th main function just like it tells me to in the sdl docs and i am including sdl.h
Is there anything else you know of that might be causing this problem?

Share this post


Link to post
Share on other sites
If you''re using VC++, you need to change the linker switch from /subsystem:windows to /subsystem:console

Share this post


Link to post
Share on other sites
ok, i just tried that and it changed the error to:

MSVCRTD.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main

BTW, i assume that is the same as making a ''win32 console app'' as opposed to ''win32 app''. since im using opengl, am i really supposed to do that?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!