I found the answer. Here are the steps :
1. Find out where your non standard library files are installed
On my Ubuntu I used the following command to find out the location of my installed files :
pkg-config --libs --cflags igraph
In above command you have to substitute igraph
with name of YOUR non standard library that you installed.
This command gave me following output :
-I/usr/local/include/igraph -L/usr/local/lib -ligraph
I noted down the path after -I
, the path after -L
and the string after -l
. These 3 need to be fed inside Netbeans in the steps below
source: http://igraph.org/c/doc/igraph-tutorial.html#idm470953198960
2. Configure Netbeans
Right click on Project in Netbeans -> properties -> Linker ->Libraries -> Add option -> Other -> type -ligraph in here
In your case you have to type what you found instead of -ligraph on your system during step #1
Project -> properties -> Linker -> Additional Library Directories > I typed /usr/local/lib in here
In your case you have to use the path you got on your system after -L
flag in step #1
Project -> properties -> C++ Compiler -> Include Directories -> I typed /usr/local/include/igraph in here
In your case you have to use the path you got on your system after -I
flag in step #1
source: https://stackoverflow.com/a/13292276/3143538
add to the Project->Properties->Run->Environment :
Name: LD_LIBRARY_PATH
Value: $LD_LIBRARY_PATH:/usr/local/lib
instead of /usr/local/lib
you have to use the path you got after -L
flag in step #1
source: https://askubuntu.com/questions/267071/ld-library-path-specification
After above steps, I am able to both compile, run, and debug the program