I need to use a C library to access and older file format used by a legacy application. The library I installed was libdbf. (Did ./configure && make && make install). It was installed under /usr/local/lib:
libdbf.0.0.1.dylib
libdbf.0.dylib
libdbf.a
libdbf.dylib
libdbf.la
I’m loosely familiar with C syntax and have done some very trivial things in C and C++, but don’t know how to include the library.
How can I include this library in my project? Sorry for the noobie question.
When you compile your project use
-ldbfThe
-lmeans link, and thedbfis the name of the library (you don’t need to include thelibpart of the name).Edit:
I haven’t used Qt, but it looks like you can add
To your
.profile. Sources 1, 2By default, gcc will look in
/usr/local/includefor the headers and in/usr/local/libfor the library. In case it you need to make it explicit, you can also add: