LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-21-2004, 07:28 PM   #1
wangjinyi
Member
 
Registered: Sep 2004
Posts: 60

Rep: Reputation: 15
a problem with libgtop


I do something like this:
Code:
int main(void) 
{ 
        glibtop_cpu myCpu; 
        glibtop_init(); 
        glibtop_get_cpu(&myCpu); 
        printf("total:%d\nuser:%d\nnice:%d\nsys:%d\nidle:%d\nfrequency:%d\n", 
                myCpu.total, myCpu.user, myCpu.nice, myCpu.sys, myCpu.idle,myCpu.frequency); 
        return(0); 
}
and when compile:

g++ -g -I. -I/usr/include myglibtop.cpp -o myglibtop -L. -L/usr/lib -lgtop
-lgtop_sysdeps -lgtop_common
/tmp/ccoRbj6c.o(.text+0x20): In function `main':
/home/jywang/myExam/glibtop/myglibtop.cpp:9: undefined reference to
`glibtop_init_r(_glibtop**, unsigned long, unsigned)'
collect2: ld returned 1 exit status
make: *** [all] Error 1

why?

do you have some examples?

email:jywang@cnic.cn
 
Old 07-17-2007, 07:59 AM   #2
sudevank
LQ Newbie
 
Registered: Mar 2007
Posts: 27

Rep: Reputation: 15
i also got the same problem. but after commenting out ligtop_init() it worked fine
any new ideas??
 
  


Reply



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
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
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration