Question

I don't know where to put the libraries nor which libraries are 64 bit or 32 bit. And it is becoming a pain spending most of my weekends trying to get a dynamic library to work. I'm using Windows 64 bit system but my program is 32 bit. Also I'm using C++. Can someone create a step by step guide.

Was it helpful?

Solution

If you develop a 32 bit program, you should use a 32 Bit SDL library.

You can place your libraries (and their headers) everywhere - but if you are using MinGW better keep blanks out of the path. Just tell the compiler where he can find those files.

And here's how to do this in NB:

First, go to Right click Project --> Properties

  • C++ Compiler: at Include Directories set the path where the headers of your libs are
  • Linker:
    • at Additional Library Directories add the path where your lib binaries are
    • at Libraries add the name (!) of your library - without prefix lib or file extension

If your Libraries are named eg. libSDL2.dll set SDL2 as name; if SDL2.dll only SDL2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top