linking static libraries using parallel routine

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

linking static libraries using parallel routine

Post by Inquisitive »

Hi All,
I need to call a function written using C++ into a static library ( .a file )
I am getting run time errors. I learnt from the help file that it is possible

External Function. This calls a function from a UNIX shared library, and may be used anywhere an expression can be defined. Any external function defined appear in the expression editor operand menu under Parallel Routines.


I have given the absolute path to the library, but it is giving me the error referenced symbol not found during runtime. The compilation of the job has gone thro fine.

Thanks Much
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Post by Inquisitive »

Can some one give me inputs. Any tried this before.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might have better luck posting this over in the Parallel Extender forum...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

Sorry, can't help here until I start playing with 7.0.1. Just got it installed today, and oh my it's pretty. :mrgreen:

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
wdudek
Participant
Posts: 66
Joined: Mon Dec 08, 2003 10:44 am

Post by wdudek »

Is the C++ compiler casuing name mangling to occur? Depending on the settings used by the compiler, c++ will add unusual symbols to the function name so that is can support two functions with the same name, but differnt parameter lists/types. In this case a function name GetMyFile might actually look like GetMyFile@@2332VVd@ or something else (this is compiler dependent). I haven't worked with parallel routines, but assuming that you have to tell it the name of the function you may have to add something like this to the function name. The person who wrote the function should be able to tell you if this is happening.
dsguy1247
Premium Member
Premium Member
Posts: 33
Joined: Wed Feb 04, 2004 6:35 am
Contact:

Re: linking static libraries using parallel routine

Post by dsguy1247 »

Hi,

From the quoted statement in the original post it appears that you can used shared libraries (.*.so) but not static libraries. I have used external C function earlier but they were all dynamic libraries.

I am not sure if this observation was helpful but I thought I should share it.

All the best
rggoud
Participant
Posts: 15
Joined: Thu Nov 06, 2003 9:59 am

Re: linking static libraries using parallel routine

Post by rggoud »

Hi,

When we tried initially, we were also getting this error "Referenced Symbol Not Found". After compiling again with CC (C++) Compiler (Datastage Documentation says the external library should be shared library created by using CC compiler) , the code worked. I'm not sure whether you can call a static library from a parellel routine.

Thanks.
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

linking static libraries using parallel routine

Post by bigpoppa »

Is this issue resolved?

BP
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

The question on whether static libraries can be called, the answer is no, it can not be called. Dynamic shared objects, on the other hand, can be called.

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
Post Reply