Trying to figure out how to get this function to return a integer. Im no c++ programmer and Im not sure how to get this to work... Any help would be appreciated.
The only thing I need is to pass in a string (from DS) and Apt_hash to return the integer back to ds.
int ObjTestOne(char Arg1 )
{
int* OutInt;
OutInt = APT_hash(char Arg1 );
int returnme = OutInt[0];
return returnme;
}
I haven't had time to study ds parallism in detail so I have been erring on the side of caution and setting up a tiny memory manager in my functions. I think the above is safe but validate it carefully to ensure that there are no thread-safety type issues. Can anyone elaborate on if datastage does any sort of protectionism and thread safety wrappers to these function calls?
Last edited by UCDI on Thu Dec 08, 2016 12:30 pm, edited 1 time in total.
I did get the code to compile however when I run this routine in a job I get the following error.
"Transformer_0: Error when checking composite operator: Failed to load the library "V0S0_cpp_test_routine_2_Transformer_0.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 "V0S0_cpp_test_routine_2_Transformer_0": /projects/DwTest/RT_BP930.O/V0S0_cpp_test_routine_2_Transformer_0.so: undefined symbol: _Z10ObjTestOnea. "
where $1 is your source file.
you might need more if you have multiple files, this is to compile a simple monolithic source file. Make is beyond me, Im a visual studio kind of guy...
yours is similar but slightly different from mine. It could be something in those differences? I can try to help -- I am very good at realtime C++ but am only low-moderate at unix.