I don't know how to link libraries with Visual Studio 2019 (I am using Windows 10), how do I link libraries?
I assume is the same as in VS 2017.
Project / "your project name" Properties... /
At Configuration select All Configurations
Then
Project / "your project name" Properties... / Configuration Properties / VC++ Directories /
At Include Directories add path to your SDL include folder
At Library Directories add path to your SDL lib folder ( lib/x86 or lib/x64 )
Then
Project / "your project name" Properties... / Configuration Properties / Linker / Input /
At Additional Dependencies add ( in this order ):
SDL2.lib
SDL2main.lib
Then copy all the .dll files from "your SDL folder" / lib / ( x86 or x64 ) to your Visual Studio project debug folder ( the debug folder in the location where your .sln file is ).
Don't forget to use #include <SDL.h>
in your code.
Also change int main()
function in main.cpp with int main(int argc, char* args[])
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With