unresolved external symbol _SDL_main |
Igor Mironchick
Guest
|
Good day.
I want to know why i receive that error when compile C++ program using SDL: SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol _SDL _main referenced in function _main -- Regards, Igor Mironchick, Intervale (c) #ICQ 492-597-570 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070120/a3a6ae03/attachment.htm |
|||||||||||
|
unresolved external symbol _SDL_main |
unresolved external symbol _SDL_main |
Ryan C. Gordon
Guest
|
#include "SDL.h" in the file with your main() function...on Windows, it will #define main to be SDL_main, which gets called from the WinMain() in SDLmain.lib. Alternately, define your own WinMain() and don't use SDLmain.lib. --ryan. |
|||||||||||||
|
unresolved external symbol _SDL_main |
Igor Mironchick
Guest
|
Thx for yours reply. I found problem.
-- Regards, Igor Mironchick, Intervale (c) #ICQ 492-597-570 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070120/5556fb51/attachment.htm |
|||||||||||
|
unresolved external symbol _SDL_main |
Alberto Luaces
Guest
|
El S?bado, 20 de Enero de 2007 18:06, Ryan C. Gordon escribi?:
On Windows, I have also found that declaring main as int main() won't do. Your "main" function should be defined as int main(int argc, char *argv[]) Just my 2 cents |
|||||||||||||||
|