Using Library files in Linux

Posted by paultop6 on Stack Overflow See other posts from Stack Overflow or by paultop6
Published on 2010-04-10T11:52:42Z Indexed on 2010/04/10 12:03 UTC
Read the original article Hit count: 337

Filed under:
|
|
|

Hi Guys,

Im trying to use some of the functions that are in the /lib/libproc-3.2.6.so library in my Ubuntu Distribution.

I have downloaded and installed the header files and they are defined in my source files.

Currently this is all im trying to do, just for starters...

proc_t **read_proc = readproctab(0);

But i get the following compiler error:

/tmp/cclqMImG.o: In function `Sysmon::initialise_sysmon()':
sysmon.cpp:(.text+0x494): undefined reference to `readproctab'
collect2: ld returned 1 exit status

Im aware im probably doing some wrong with the command im using to compile it, but due to lack of experience im not sure what im doign wrong. This is the g++ command im using to compile my cpp file:

g++ -o sysmon.o sysmon.cpp `pkg-config --libs --cflags gtk+-2.0`

Can someone please give me some pointers as to where im going wrong

Regards

Paul

© Stack Overflow or respective owner

Related posts about c++

Related posts about g++