Operating System - HP-UX
1832695 Members
2829 Online
110043 Solutions
New Discussion

problem on using a compiled source code to another profile

 
Mokhzamir Aznan
New Member

problem on using a compiled source code to another profile

OS used : HPUX 11.11

currently we are working on 2 different profiles, one known as SIT & another one as UAT. Both of the profile have their own HOME directory & library, with SIT profile using the $RBS_HOME=/MIGAppl and UAT profile using the $RBS_HOME=/BPDAppl. The library is reside separately in each own HOME directory.

For your information, both of the profiles used the same application engine, but serve to different purpose. We compile the source code (application engine) located in SIT profile, which link to predefined SIT library and it successfully done.

So the question is, can we copy the same compiled source code (application engine) to another profile (which refer to UAT) without compiling it again, but dynamically refer to the predefined UAT profile HOME & library directory?

Thanks for your help.

1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: problem on using a compiled source code to another profile

Your question is not very clear. If this is actual executable code as opposed to some form of pseudo-code which runs under a p-engine then it depends upon whether you libraries are statically or dynamically linked. If static, then the application won't care if the libraries are even present because the library code has been copied into the executable. If the library code is dynamically linked at run-time then you need to set the SHLIB_PATH environment to tell the application where to look for shared libraries. Man ld and chatr for details.

You can use the ldd command to list all the dynamic dependencies of an executable. Man ldd for those details.

If it ain't broke, I can fix that.