LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2003, 08:50 PM   #1
CraigN
LQ Newbie
 
Registered: Feb 2003
Location: Austin, Texas
Distribution: Suse 8.1
Posts: 2

Rep: Reputation: 0
Link errors from gcc


Hello all,

I'm trying to compile a program to produce BMRT 2.5 RIB files using the ri.h and libribout.a. I'm using BMRT 2.5 so I can use Borg for rendering on multiple machines.

I'm using a fresh install of Suse 8.1 with all gcc libs and accessories loaded. (I think)

It appears as though the linker does not see some basic library even though all the libs are available.

Here is a sample of the errors:
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../libribout.a(ribbegin.o): In function `RiBegin':
ribbegin.o(.text+0xb): undefined reference to `__builtin_new'
ribbegin.o(.text+0x27): undefined reference to `__throw'
ribbegin.o(.text+0x39): undefined reference to `__builtin_delete'
ribbegin.o(.text+0x43): undefined reference to `terminate(void)'
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../libribout.a(ribout.o): In function `RIBStream::RIBStream(char const *,...)':
ribout.o(.text+0xcd1): undefined reference to `__throw'
ribout.o(.text+0xcf1): undefined reference to `terminate(void)'

I've used the -L parameter to make sure the compiler knew where the libs were.

This is my current compile line:
gcc -oanimate animate.cpp -lribout -lm

Thanks in advance for any help.

Craig
 
Old 02-27-2003, 11:54 AM   #2
no2nt
Member
 
Registered: Aug 2001
Location: South Carolina, USA
Distribution: Redhat 8.0/Custom
Posts: 96

Rep: Reputation: 16
Try
g++ -oanimate animate.cpp -lribout -lm

and make sure the g++ rpm/package is installed.

Last edited by no2nt; 02-27-2003 at 11:57 AM.
 
Old 02-27-2003, 07:43 PM   #3
CraigN
LQ Newbie
 
Registered: Feb 2003
Location: Austin, Texas
Distribution: Suse 8.1
Posts: 2

Original Poster
Rep: Reputation: 0
c++ linking problem -- Solved! --

I found out what the problem is. gcc 3.x and an old library.

After version 3 one needs to "recompile all your libraries" due to "improvements" in gcc. I understand that the changes have been made to make gcc closer to standard c++. Problem for me is that I don't own the source for the library I need and it will NEVER be made available. I'm free to use the old library as-is though.

I successfully compiled and linked on a Debian system with gcc 2.95 . My best bet appears to go to an earlier version of gcc.

Thanks
 
  


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
problem when trying to static link with gcc glvgfz Programming 11 09-18-2005 07:58 PM
How to link a library to gcc? Andrea_81 Programming 6 05-05-2005 04:22 AM
gcc link question eskimo22 Programming 2 03-03-2004 03:09 AM
Apache / gcc errors ridertech Linux - Newbie 6 02-13-2004 01:59 PM
gcc errors?? or are they? Rito Linux From Scratch 1 01-06-2003 04:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:17 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