Entry point must be defined.

Pages: 12
1st off, question if you installed properly. To quote genpfault over at stack overflow :

Create an empty VS2012 project ("sdl-test") in c:/temp. I recommend unchecking "Create directory for solution".
    Download SDL2-devel-2.0.0-VC.zip
    Extract contents of SDL2-devel-2.0.0-VC.zip/SDL2-2.0.0/lib/x86 into c:/temp/sdl-test/lib
    Extract contents of SDL2-devel-2.0.0-VC.zip/SDL2-2.0.0/include into c:/temp/sdl-test/include/SDL2
    Open Configuration Properties
    Add include to C/C++ -> General -> Additional Include Directories
    Add lib to Linker -> General -> Additional Library Directories
    Add SDL2main.lib and SDL2.lib to Linker -> Input -> Additional Dependencies
    Change Linker -> System -> SubSystem to Console or Windows.
    Add code, using #include <SDL2/SDL.h>.
    Copy lib/SDL2.dll to your Debug and Release output directories.

Also, I agree with computerquip, moving on to SDL 2.0 is a good idea. Many of the hacks needed to get SDL 1.2 to run smoothly are not needed in 2.0. As for tutorials, as long as you don't mind reading documentation, you can always use lazyfoo's 2.0 tutorial here : http://lazyfoo.net/tutorials/SDL/index.php

Edit : If you're going to stick with 1.2, you can just remove the 2 from the instructions and it will work the same.
Last edited on
I've done what you said @roger911. I've downloaded 2.0 and i'm going to give it a try. I'm getting this new error though.

MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

This usually means that SDL has linked to the C++ std library statically and you've linked dynamically (or vice versa).

Go into your project properties. Browse through there until you see a field with "Multi-threaded /MT", "Multi-threaded DLL /MD", and a few debug versions as well. Change this value and then try re-compiling.

I don't have VS installed on this PC so I can't tell you exactley where the option is, but I think it's under C++/General.
Last edited on
I tried it and it didn't work, but now I am getting something new.

1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol _SDL_main referenced in function _main

1>C:\Users\Joshua\Desktop\SDL\Temp Executive Files\2\Debug\2.exe : fatal error LNK1120: 1 unresolved externals
Hey! I tried it after 2 days and now it works! Thanks, guys, for all help and suggestions!
Topic archived. No new replies allowed.
Pages: 12