Archived

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

robirt

Linking Error

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
Make sure you use the int main with the correct parameters as specified in the SDL docs. And be sure to include "sdl.h" in the file that contains your int main.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

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
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