A newbie programming question.
When compiling a program with command
gcc complains
Code:
/tmp/ccYeJqKe.o: In function `main':
test.c:(.text+0x12): undefined reference to `npth_init'
collect2: error: ld returned 1 exit status
The source is attached
Code:
#include <npth.h>
int main(int argc, char** argv)
{
npth_init ();
return 0;
}
I am sure the library is installed. Package manager display
Code:
sudo dpkg -S npth.h
libnpth0-dev: /usr/include/npth.h
Adding -I/usr/include doesn't help.
My environment: gcc (Debian 4.9.2-10) 4.9.2, kernel: 4.0.0-2-rt-686-pae
How should I fix this error?
Thanks