Linking a library
Dave Korn
dk@artimi.com
Fri Nov 19 16:14:00 GMT 2004
> -----Original Message-----
> From: gcc-owner On Behalf Of Daniel Wells
> Sent: 19 November 2004 06:42
> I am trying to program a PC-104 board which is running a version of
> TS-Linux. However the code needs to be written and compiled on a
> separate development computer. However, TS-Linux and whatever version
> of linux is on the development workstation have gcc libraries
> that most likely do not match.
Then you are cross compiling.
> I know that the version of TS-Linux uses glibc 2.2.5. On the
> website for
> the PC-104 board they have a file at the following link
> http://www.embeddedx86.com/downloads/Linux/ALL.entire.libs.dir
> s.tar.bz2
> Which supposedly has all of the libs needed to compile code to run on
> the PC-104 board.
Just as a general point, if you have a support issue with something you
got from embeddedx86.com, shouldn't you have tried raising it with them
first? They are after all the ones who know the best whatever system it is
they've cooked up.
> However I do not know how to set up gcc on the development box so that
> it links explicitely against these libraries. Is there a way
> to set it up so that
> these libs are the default libs? And if so is there an easy
> way to set
> it up so I can switch between the two easily. (If not I still prefer
> the secondary libs to be the default) Thanks for your help.
Basically, you have a cross-compilation situation here. The host on which
you are compiling and the target for which you are compiling are two
different target triplets, for which you should have two different builds of
gcc installed, each one of which has it's entirely separate set of
libraries. You should be able to point configure at the target's libraries
and the gcc build/install process should automagically put them in the right
place and tell the cross-compiler to use them. Look at the --with-libs
option, documented in the gcc website[1] amongst other places, and take a
look at Dan Kegel's[2] and Bill Gatliff's[3] websites for further
information and help about building and installing cross compilers.
[1] - http://gcc.gnu.org/install/configure.html
[2] - http://www.kegel.com/crosstool/
[3] - http://crossgcc.billgatliff.com/index.html
cheers,
DaveK
--
Can't think of a witty .sigline today....
More information about the Gcc
mailing list