Skip to main content
gamedev.net
🔒 Locked

Small SDL error

Started by enigmamwu03 Dec 7, 2002 at 11:20 PM 4 replies 400+ views
Original Post
enigmamwu03
enigmamwu03
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.
Lunatic Raven
Lunatic Raven
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.
"...."
lesmes
lesmes
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.