As a general answer to this question to get any sdk to work, you need to do three things:
#include
the appropriate headers in your source so that the compiler can check you've used the right functions and the linker knows which symbols you're refering to.
- Tell the compiler where your header files are. You can do this with gcc using
gcc -I/path/to/header/dir
.
- Tell the linker where the libs are that are to be compiled in and to include them. Again, using gcc, you do this with
gcc -L/path/to/library/dir
and you tell gcc (well, ld) to link to a specific library using gcc -lnamewithoutlibprefix
(lowercase l).
As an example for a library I use a lot, MPIR, against the /opt tree, I might compile like this:
gcc -I/opt/include -L/opt/lib -lmpir myprog.c -o myprog
That's just an example and is very Linux-specific. In truth, MPIR is installed in /usr and I don't need to do this, I'm just picking on it by way of example here.
For Windows, take a look at cl /I, and LINK.EXE options.
Of course, you can automate this process under a number of different development environments. Visual Studio, for example, will generate the correct command lines for you if you fill in the right dialog boxes. So I believe will Eclipse and I know Dev/C++ can, too.