Archived

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

Codman

I have a problem when building a project with SDL

Recommended Posts

IDE: VC6 I followed the steps included in VisualC.html for creating the project but I get an error: MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16 All directories, included files are ok...and the main() is the doc''s one. Any ideas what is wrong?

Share this post


Link to post
Share on other sites
dont know if this is it, but i remember forgetting to do this and getting wierd errors with sdl. you need to make sure your building a multithreaded dll, its proj,settings,c++,codegeneration from memory

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need to make it a win32 console app. you can do this by altering the /subsystem:windows to /subsystem:console in the linker settings.

Share this post


Link to post
Share on other sites
Thanks for the answers. It seems like I''m a little bit absent minded today. I didnt notice I forgot to include sdl.lib and sdlmain.lib in my project.

-----------------------------
Codman - "The source for all things"
"We design for eternity"

Mail: Codman_Wu@personal.ro

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
He fixed it, but I would still like to point out that it is not supposed to be a console application with main, it is supposed to be a win32 app with WinMain. WinMain is in this case in SDL_main.lib, and will call the main() you provide.

Share this post


Link to post
Share on other sites