I have a problem when building a project with SDL

Started by
5 comments, last by Codman 20 years, 6 months ago
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?
-----------------------------How to create atmosphere? Bring in EMOTIONS!
Advertisement
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
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.
yep console app and make sure you have

int main(int argc, char** argv)
{
return 0;
}

and not just main()

Lazzar

if god gave us the source code, we could change the world!
---------------------------------------------------------if god gave us the source code, we could change the world!
And make sure you link "SDL_main.lib" to your project.
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
-----------------------------How to create atmosphere? Bring in EMOTIONS!
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.

This topic is closed to new replies.

Advertisement