标签:develop source miss lib input div tin .net setting
1)First thing you need to do is download SDL 2 headers and binaries. You will find them on the SDL website, specifically on this page.
You‘ll want to download the visual c++ development libraries.
Open the zip archive and there should be a folder called SDL2-2.something.something. Copy the contents of the folder and put it anywhere you‘d like. I recommend putting it in a folder that you dedicate to holding all your development libraries for Visual Studio. For these tutorials I‘m putting them in a directory I created called C:\vs_dev_lib
2)Start up Visual Studio and create a new empty project.
3)Go to project properties.
4)Now we have to tell Visual C++ to search for header files in the SDL 2 include folder we just extracted. Under Configuration Properties in the VC++ Directories menu, select the Include Directories field, click the tiny down arrow button, and click edit.
5)Click the folder icon, and then click the button that pops up.
6)Now go find the SDL2 folders you extracted, and select the include folder and click OK.
Now Visual Studio knows where to find the header files. If you get an error that the compiler can‘t find SDL.h, it means you messed up this step.
7)Next we going to tell Visual C++ to search for library files in the SDL 2 library folder we just extracted. Select the Library Directories field, click the tiny down arrow button, and click edit.
8)Click the folder icon, and then click the button that pops up.
9)Now go find the lib folder you extracted, and select the lib folder where you find two folders. There‘s one for 32bit x86 architecture and for 64bit x64 architecture.
This is important: most compilers still compile 32bit binaries by default to maximize compatibility. We will be using the 32bit binaries for this tutorial set. It doesn‘t matter if you have a 64bit operating system, since we are compiling 32bit binaries we will be using the 32bit library. This means you need to select the x86 folder and click ok. Now Visual Studio knows where to find the library files. If you get an error how the linker can‘t find SDL2.lib, it means you missed this step.
10)In order to compile SDL code, we have to tell the Visual C++ to link against the libraries. Go under Linker in the Input menu, edit the additional dependencies.
11)Now paste
【转】Setting up SDL 2 on Visual Studio 2010 Ultimate
标签:develop source miss lib input div tin .net setting
原文地址:https://www.cnblogs.com/justbeginning/p/9541329.html