I am sure that this question has been asked many times, but I cannot understand it. The bear is with me.
So, when you download the library, you get a bunch of .c and .h files, as well as many other things. Now say that you want to write a program using this library.
I copy all .h files to the project directory. It just doesn't compile.
Great, so I get the library as a bunch of .dlls, and I copy the DLL to my project directory. Still not compiling.
How it works?
What do you do, for example, right after creating a folder for your project? What parts of the library package do you copy / paste into the folder? How do you do it so that it can compile? Go through the steps with me, please.
- Where to place .h files?
- Where to place dll files?
- How to compile?
Thanks.
(The library I'm trying to get is libpng, I'm on Windows with MinGW, and I'm looking for compilation from the command line, as usual.)
(from what I am collecting, you put the .h files in directory A and the DLL files in directory B, and you can use the -l and -L compiler options to tell the compiler where to find them, is that right?)
source
share