Jump to content
  • Advertisement

Archived

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

enigmamwu03

Small SDL error

This topic is 5820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can''t find out what this stupid linking error wants. Can anyone help me? Linking... MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16 I am using some of the apclasses such as apvector, apstring in my program but I haven''t even done anything in the code but this: #ifdef WIN32 #include <windows.h> #endif #include <SDL.h> #include <stdio.h> #include <stdlib.h> #include "MPlayer.h" #include "MProperty.h" int main( int argc, char* argv[] ) { return 0; } Any help i can get i take, thanks.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I always set up my SDL projects as Win32 Application, and they work. Ive seen this error before, I think this has to do with not linking to the libraries right.

Share this post


Link to post
Share on other sites
You have to include "SDL_main.h" and link sdlmain.lib. It converts your int main(int argc,char*argv[]) function in a winmain one.
Your project must be a Win32 app project and you have to use "Multithreaded DLL" runtime library. To setup this (in VC++ 6), go to Project Settings->C/C++->Category Code Generation.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!