LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-13-2005, 02:55 AM   #1
villie
Member
 
Registered: Apr 2004
Location: Pakistan
Distribution: RedHat
Posts: 46

Rep: Reputation: 15
Relinking object files


Hi everybody,

I have a question regarding relinking of object files.

I work on a multfile project. I have rewritten makefile, which produces object files from C/C++ files, and then links them (along with standard libraries) to create the final binary.
Now I take these object files to other Linux version. ( The original object files are created on Redhat 9.0) and the new linux version is Fedora Core 4. Now when I try to link them, I get lots of link error messages, and I am unable to produce the final binary.

My question is, 1) Do we need to use the same linux version again for relinking ?
2 ) If not, what am I doing wrong ?

Many Thanks
Villie
 
Old 10-13-2005, 03:31 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Like you, I would think that it should work without problems. But I can imagine that you need (almost) the same compiler version.
 
Old 10-13-2005, 10:44 AM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
It's been a little while since RedHat 9, especially if you haven't upgraded your compiler / linker to a new version. Your best bet for moving code is in source format, complete with a tweakable Makefile.

This is the reason that binary distribution hasn't evolved nearly as much within the open source community as it has within, say, the Windows community. Sure we've got packages, but you need a different one for each distro and release version. And even then, sometimes you can kiss your package install goodbye because of library version conflicts. But that's a good thing, though; because source is always better than binary.
 
  


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
Why cannot compute suffix of object files? bhxs1809 Linux From Scratch 11 03-05-2012 12:04 PM
glibc in capter 6 -- error: cannot compute suffix of object files Yoyo302 Linux From Scratch 23 05-21-2010 08:28 AM
how to create unlinked object files from source irfanhab Programming 1 08-18-2005 12:11 PM
Object Files in Slackware? okter Programming 1 05-11-2005 03:16 PM
Event driven object-to-object: C++ template class mecanism ( NOT STL or STDC++) bretzeltux Programming 2 12-23-2003 02:45 PM

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

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