Find the answer to your Linux question:
Results 1 to 3 of 3
hi all, i am trying to compile a source with a shared library using cross compiler cross-gcc file.c file.so exec while compiling am giving the path of the library in ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    11

    problem in shared library path

    hi all,
    i am trying to compile a source with a shared library using cross compiler

    cross-gcc file.c file.so exec

    while compiling am giving the path of the library in host

    and when am trying to run the same at target its saying library not found

    actually binary searching for the library in the path which i given while compiling

    can u tell me how to give library path while compilation and during running in target it needs to take the target path

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    Can you give more detailed information? What is the shared library? Where is the library located? Can you post exact error output when running compiler?

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    11
    Quote Originally Posted by coopstah13 View Post
    Can you give more detailed information? What is the shared library? Where is the library located? Can you post exact error output when running compiler?
    hi
    am compiling the source by this options

    arm-linux-gnueabi-gcc ./gdb.base/gdb1555-main.c ./gdb.base/gdb1555.so -g -lm -o ./gdb.base/gdb1555-main

    in that the shared library gdb1555.so am giving with path

    and while running in target am getting the error like library not found

    the library path in target is different

    i checked the strings inside the binary

    its having the path to the shared library

    so while running its taking the hardcoded path for shared library

    ..

    is there any way to give shared library as a compile time and it do not disturb the execution on target

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...