LinuxQuestions.org
Visit Jeremy's Blog.
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 02-09-2009, 04:58 AM   #1
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Rep: Reputation: 15
libgtop error , please give me solution


Hi all,
I have problem with libgtop , i am using fedora core2, while compiling my application the following error i am getting,
/tmp/ccggBu9l.o(.text+0x23): In function `main':
: undefined reference to `glibtop_init_r(_glibtop**, unsigned long, unsigned)'
collect2: ld returned 1 exit status

i compiled as follows:
g++ df.cpp -I /usr/local/include/libgtop-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -lglib-2.0 -lgtop-2.0

please tell me why the above error coming.

if i use the gcc instead of g++ , the above error not occurring.
gcc df.c -I /usr/local/include/libgtop-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -lglib-2.0 -lgtop-2.0



Thanks,
barani
 
Old 02-09-2009, 11:57 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,281

Rep: Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897Reputation: 7897
Quote:
Originally Posted by kbarani View Post
Hi all,
I have problem with libgtop , i am using fedora core2, while compiling my application the following error i am getting,
/tmp/ccggBu9l.o(.text+0x23): In function `main':
: undefined reference to `glibtop_init_r(_glibtop**, unsigned long, unsigned)'
collect2: ld returned 1 exit status

i compiled as follows:
g++ df.cpp -I /usr/local/include/libgtop-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -lglib-2.0 -lgtop-2.0

please tell me why the above error coming.

if i use the gcc instead of g++ , the above error not occurring.
gcc df.c -I /usr/local/include/libgtop-2.0 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -lglib-2.0 -lgtop-2.0



Thanks,
barani
First, Fedora Core 2 is very, VERY old...the latest is FC 10. I'd strongly suggest updating, since all of the libraries and compilers have gone through MANY upgrades/patches since FC2.

And if you're getting your program to compile/work with gcc....why not just use GCC??
 
Old 02-10-2009, 12:24 AM   #3
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Original Poster
Rep: Reputation: 15
In my project is c++ based ,so i have to use the g++ compiler.

Thanks,
Barani
 
  


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
please give me the solution quickly jayshankar123 General 15 02-19-2009 08:45 AM
A no other site URL on first post rule. Then I give my solution to this sound issue! bvip2003 LinuxQuestions.org Member Intro 1 12-13-2007 03:18 AM
"please give a correct solution" sarathforlinux Linux - Newbie 2 08-31-2006 11:06 AM
give me a solution halovivek Linux - Newbie 2 11-14-2003 07:16 PM

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

All times are GMT -5. The time now is 05:52 AM.

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