LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-20-2006, 01:19 AM   #1
Zhanwen
LQ Newbie
 
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
an old problem of libgtop 2.10


Hello

I'm using FC4. When I gcc the following simple c code, it fails due to the reason that it cannot find the proper libgtop library. But the make file log matches the official release and I also can find the libgtop-2.0.so etc library files in /usr/lib. I searched around all the internet and find it is a common problem, but cannot find even a solution to that. If someone have ideas, can you give me hand. Any of your help would be greatlly appreciated.

////////////////////////
// cputest.c

#include <glibtop.h>
#include <glibtop/proclist.h>
#include <glibtop/procstate.h>
#include <glibtop/proctime.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
glibtop_cpu cpu;
glibtop_get_cpu(&cpu);
gint total_time = cpu.total;
return total_time;
}


////////////////////////////////////////
I use this command :
gcc -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include cpumain.c

and always return :

/tmp/ccGvToLC.o(.text+0x21): In function `main':
cpumain.c: undefined reference to `glibtop_global_server'
/tmp/ccGvToLC.o(.text+0x31):cpumain.c: undefined reference to `glibtop_get_cpu_l'
collect2: ld returned 1 exit status


I feel quite headache on this problem. And many thanks in advanced for any of your kindly help.

Zhanwen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a problem with libgtop wangjinyi Linux - Software 1 07-17-2007 07:59 AM
libGtop 2.8 wont install Scott7 Debian 3 10-18-2005 01:28 PM
Gdesklets and libgtop and FC4 x86_64 pafinator11 Linux - Software 1 08-15-2005 04:01 PM
libgtop message when installing gdesklets rosscopeeko Mandriva 1 08-23-2004 09:16 AM
GDesklets needs libgtop-2.0.pc on PKG_CONFIG_PATH lramos85 Linux - Software 1 02-10-2004 11:15 PM


All times are GMT -5. The time now is 10:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration