在使用Datastage parallel routine的时候,需要调用DS自带的API函数DSSetEnvVar,使用C++做了编码,编码如下:
#include
#include
int SetEnvVar(char *Projname,char *var,char *val)
{
return DSSetEnvVar(DSOpenProject(Projname),var,val);
}
对这部分编码使用g++ -O -fPIC -Wno-deprecated -c SetEnvParam.c 进行编译,能够正常通过,没有任何问题,在Manger中定义parallel routine指定到生成的object文件,但是在tranformer中调用这个routine运行时候,会出现如下的错误:
transformer01: Failed to load the library "V0S177_SCD2_1_1_transformer01.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 "V0S177_SCD2_1_1_transformer01": /home/dsadm/Ascential/DataStage/Projects/Test/RT_BP87.O/V0S177_SCD2_1_1_transformer01.so: undefined symbol: DSOpenProjectEx.
有没有哪位朋友对这个问题比较了解的,指导一下!
MSN:[email protected]
QQ:24679972