Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 06-30-2005, 07:27 AM   #1
LQ Newbie
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
link using library

Hi, i have a problem with compile a simple program in a machine an execute it on an other. I'm not a linux expert so i try to illustrate my situation.

I have 2 system with the same version of linux kernel 2.4.19.
I need to compile the simple code on the first machine and then run on the other because the second system is a very reduced installation (it is on a flash ramdisk).
I compile the code on the first machine with : "gcc source.c -lm -o source.o"
and when i use ldd cmd i obtain this: => /lib/ (0x4001b000) => /lib/ (0x40038000)
/lib/ => /lib/ (0x40000000)

Version information:
./test_time.out: (GLIBC_2.0) => /lib/ (GLIBC_2.0) => /lib/
/lib/ (GLIBC_2.0) => /lib/
/lib/ (GLIBC_2.1.1) => /lib/ (GLIBC_2.1) => /lib/ (GLIBC_2.0) => /lib/

Where -> -> ->

The executable file can't run in the second machine because it have only the library.

I tried the "-static" option with gcc and the program run but it work uncorrectly.

MY QUESTION IS: what is the best solution for this problem ? Compile the code using the 0.9.20 library or install the 2.1.3 on the secon system? Is possible to use cross-compiling ?

Thank in advance for any help


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
Problem installing - libtool: link: cannot find the library `__LIBGL_PATH__/' sparX CG Linux - Software 4 11-14-2005 06:45 PM
GNU based c++ cross compiler unable to link c library k_taid Programming 1 06-29-2005 10:38 AM
How to link a library to gcc? Andrea_81 Programming 6 05-05-2005 05:22 AM
KDevelop, how to link a library?? Umanga Programming 1 01-10-2005 06:13 PM
how to static link a specific library? koodailar Programming 3 07-26-2004 04:35 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration