View Full Version : Does any one here know how to use Simple Direct Media Layer? I need help..

09-16-2001, 10:38 AM
Sorry this topic is a little of base, but I do use OpenGL for all my graphic needs but I am experimenting with SDL for my Input and audio. My question is,why when i compile me project, it goes without a warning or error, but when i attempt to compile/execute my program i get this error message

SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol _SDL_main
Debug/Next step.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I place the dll file in the directory, and add the SDL.lib, and SDLmain.lib files to the active project. And i also initialize my code generation to multithreading dll.
I have other peoples code that will run just fine with this setup, but for some reason my wont. Any suggestions?.?.

09-16-2001, 11:43 PM
Hi !

Posting this at the SDL mailinglist would give you a better answer I think.

I wild guess is that you have missed on some option in the project settings, compare your project settings with one of the examples included with SDL.


09-17-2001, 12:25 PM
Just put '#undef main' between your '#include "SDL/SDL.h" and int main()...

09-17-2001, 07:36 PM
This may be an SDL faq:

Also, make sure you are linking SDL_main BEFORE the SDL library.

- Mike