0
votes

I have been having this issue for a very long time, I have not even had no luck and it is becoming very frustrating. I am really itching to create games in C++ with OpenGL/SDL. I am using Microsoft Visual Studio Ultimate 2012. My Operating System is a 64-bit Windows 7.

I had no troubles setting up OpenGL with Visual Studio, but SDL is the main problem. I follow lazy foo tutorials, I looked at YouTube videos, god damn it is irritating. The error I am getting when debugging SDL in Visual Studio is:

1>SDLMain.obj : error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main 1>SDLMain.obj :
error LNK2019: unresolved external symbol _SDL_Quit referenced in function _SDL_main 1>MSVCRT.lib(crtexew.obj) :
error LNK2019: unresolved external symbol WinMain@16 referenced in function __tmainCRTStartup

1
Did you link with SDL library file by specifying the name of the lib file in the project settings? Also from what I have checked, the available development libraries from the main website for win32 are built for eariler versions of Visual C++ (version 6,7,8 and 9). Since you are using Visual Studio 2012, which is version 11, you should download the SDL source and build the SDL library yourself using VS2012 instead.ksming

1 Answers

0
votes

I do not know what you mean by building the libraries by myself, but I did link the SDL Library. I switched from x64 to x86 and when I debugged my code again I got this message:

The application was unable to start correctly (0xc000007b). Click OK to close the application.

So your saying if I downloaded an earlier version of Visual studio, I can run SDL without a problem?