Operating System - HP-UX
1834260 Members
9523 Online
110066 Solutions
New Discussion

Re: Setting Up A Specific Gcc libary for temporary use

 
Andrew Kaplan
Super Advisor

Setting Up A Specific Gcc libary for temporary use

Hi there --

I want to temporarily use a gcc library in an NFS directory as opposed to its local, and older, filesystem counterpart. The purpose of this exercise is to be able to compile a program using the newer gcc library as opposed to the older one.

The shell that I am using is tcsh. What is the correct syntax to use?
A Journey In The Quest Of Knowledge
2 REPLIES 2
Arunvijai_4
Honored Contributor

Re: Setting Up A Specific Gcc libary for temporary use

Hello,

You can export SHLIB_PATH and (or) LD_LIB_PATH before start compiling your app.

# export SHLIB_PATH=:$SHLIB_PATH

Also, you can copy and put that lib in /usr/lib or /usr/local/lib after renaming old lib.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
OldSchool
Honored Contributor

Re: Setting Up A Specific Gcc libary for temporary use

--or--

-L

should cause the linker to look in first when resolving link names.

you can check the excutable with "chatr" to see if the correct file is in the output of the link.