Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SDL2 SETUP
- Download source & compile SDL2/SDL2image
- https://libsdl.org/download-2.0.php
- https://www.libsdl.org/projects/SDL_image/
- Open C:\Temp\SDL2-2.0.20\VisualC\SDL\SDL.vcxproj
- C/C++ / Code Generation / Runtime Library : MT
- General / Configuration Type : Static Library
- Repeat for SDL2image but also add SDL2/SDL2main includes in C:\Temp\SDL2_image-2.0.5\VisualC\external\include
- (potentially needs to include C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt)
- Create a test program and link the libraries:
- //#include <iostream>
- #pragma comment(lib, "advapi32")
- #include <SDL.h>
- int main(int argc, char **argv) {
- if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
- //std::cout << "SDL_Init Error: " << SDL_GetError() << std::endl;
- return 1;
- }
- SDL_Quit();
- return 0;
- }
- C/C++ / Code Generation / Runtime Library : MT
- VC++ Directories / Include Directories : $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Temp\SDL2_image-2.0.5\VisualC\external\include
- Linker / General / Additional Library Directories : C:\Temp\SDL2-2.0.20\VisualC\Win32\Release;%(AdditionalLibraryDirectories)
- Linker / Input / Additional Depoendencies : SDL2main.lib;SDL2.lib;winmm.lib;version.lib;Imm32.lib;Setupapi.lib;libcmt.lib;libucrtd.lib;user32.lib;gdi32.lib;shell32.lib;ole32.lib;oleaut32.lib
- Linker / Input / Ignore Specific Default Libraries : msvcrtd.lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement