I am importing a library called libspatialindex from http://libspatialindex.github.com/ into my current project named “rtreelibrarytest” in netbeans. In order to import the same into netbeans I followed the following steps:
- Using Options => Build => Linker => Libraries included the library files with extension ‘.a’.
- Using File => Project Properties => Build => C++ Compiler => General => Include Directories (Included the directory)
Now when I build the project as well as the library. The library has been included in the project. I get the following error:
make[2]: *** No rule to make target `../rtree/spatialindex-src-1.8.0/src/tprtree/.libs/librtree.a', needed by `dist/Debug/GNU-Linux-x86/rtreelibrarytest'. Stop.
I am not able to figure out as to what should now. Also I am a novice in c++. Can someone please help.
You don’t need to specify the
includedirectory where your library file is. I suspect that this is your problem. You should only change the include directory to point atincludedirectories, not libraries.Your
1.)step looks valid, your2.)appears invalid. You should, however, add thelibrarypath to the linker, if not already present.