I've used SDL with my MSVC++ version before for some small projects and didn't have any problems with it.
EDIT: I'm using MSVC++ 7
However, I downloaded whatever update there was for SDL and made a new project and for some bizarre reason it doesn't link anymore. I only played around with SDL before, so I don't have any projects to run to check to see if its just that one project's settings.
This is my build output:
------ Build started: Project: sdl_tests, Configuration: Debug Win32 ------
Compiling...
main.cpp
Linking...
sdlmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol _SDL_main referenced in function _main
Debug/sdl_tests.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Paul\My Documents\projects\forge\sdl\sdl_tests\Debug\BuildLog.htm"
sdl_tests - 2 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
Here's what I did:
Added header files to C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\sdl
Added library files to C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
Put the SDL.dll into C:\WINDOWS\system32
Set the C++ Code Generation to a multithreaded DLL
Set the properties to include sdl.lib and sdlmain.lib as additional dependencies under "Linker Input"
I did my best to follow the instructions as given on
here. Also, I tried making the project multiple times (with different names) to make sure I didn't mess up the project settings.
Could someone offer any suggestions, because I'm very confused as to what I did wrong or I'm missing? If you need anymore information to diagnose the problem, please let me know, because I've tried for an hour and I'm not sure why this isn't working.
This is the source I'm trying to run:
#include <sdl/SDL.h>
int main() {
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}