Hi
I am trying to compile a C++ routine on solaris ,I used the command
g++ -O -fPIC mutiplyrtn.c -c -o mutiplyrtn.o , the object file is created ,after creating the routine through manger ,when used in transformer ,the job gets compiled but it fails at run time with error .
Transformer_3: Failed to load the library "V0S3_temp_Transformer_3.so"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S3_temp_Transformer_3": ld.so.1: osh: fatal: relocation error: file /opt/etl/Ascential/DataStage/Projects/BDR_DEVL/RT_BP3756.O/V0S3_temp_Transformer_3.so: symbol __1cIkeyWords6Fpc_0_: referenced symbol not found
Is it the right command to compile c++ code on soalris as I have some .o files and routines created by a contractor who left and they run fine
Thanks
Arif
C++ Comand to compile a routine on solaris
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 87
- Joined: Sat Mar 18, 2006 11:45 pm
Hi,
Check this post.
http://dsxchange.com/viewtopic.php?t=87 ... ee7882e274
And do a search on "ld.so.1: osh: fatal: relocation error: " with search all terms option,we have few posts discussed on this.
Check this post.
http://dsxchange.com/viewtopic.php?t=87 ... ee7882e274
And do a search on "ld.so.1: osh: fatal: relocation error: " with search all terms option,we have few posts discussed on this.
-
- Charter Member
- Posts: 87
- Joined: Sat Mar 18, 2006 11:45 pm
when I used the commandseanc217 wrote:Try the .o library instead and define that in DataStage as an object.
Let me know if this works for you.
I could not get a .so to work on Linux but the .o does!
Sean
g++ -O -fPIC mutiplyrtn.c -c -o mutiplyrtn.o
only a .o file is created,and in datastage manger object type I checked the Object radio button . and the library path as ../routines/myroutine.o.
Do I need to change something here to use .o library
-
- Charter Member
- Posts: 87
- Joined: Sat Mar 18, 2006 11:45 pm
Got it ,We need to use the following command format to generate object file
APT_LINKER APT_COMPILEOPT <<programme name>> -o objectfilename.o
APT_LINKER,APT_COMPILEOPT are the environment variables whose values can be obtained from administrator.
Thank you all who helped me solve this and ofcourse all DSXCHANGE team.
ARif
APT_LINKER APT_COMPILEOPT <<programme name>> -o objectfilename.o
APT_LINKER,APT_COMPILEOPT are the environment variables whose values can be obtained from administrator.
Thank you all who helped me solve this and ofcourse all DSXCHANGE team.
ARif