Small SDL error

Started by
4 comments, last by enigmamwu03 21 years, 5 months ago
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.
Advertisement
Your project is a WIN32 Application, which requires the entry function to be WinMain, you need to set your project to be a WIN32 Console Project.
"...."
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.
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.
Did you link to SDL_main.lib?
I think you have to link sdlmain.lib


RacingTREME - Linux ShipBattle

This topic is closed to new replies.

Advertisement