I need to determine if what I am trying to do is even possible. I am not a c programmer by any stretch of the imagination. However, I have inherited this project because nobody else knows c here either (short straw). Hopefully one of you c gurus can help me stop beating my head against the wall...
Our environment is Red Hat Linux 6.2 and Oracle. In the past, I have been able to create a c interface routine to CyberSource's credit card clearing SDK. To function in their environment, Oracle requires that it be a .so shared object. CyberSource provided both a .so and .a version of their routines as well as some good examples of how to do the compile and link. Using the .a version, I was able to create a usable .so using:
gcc -c -O pcdcrcard.c
ld -G -o pcdcrcard.so pcdcrcard.o libics2.a -lc
The libics2.a library is just under 800KB. My resulting .so is fairly close in size to that.
Now I am trying to create a similar interface for the TeleCheck electronic check processing SDK. Unfortunately they only provide a .so file and absolutely no examples or documentation.
When I try something similar to the CyberSource example:
gcc -c -O pcdtelecheck.c
ld -G -o pcdtelecheck.so pcdtelecheck.o libpfpro.so -lc
I get a .so out, but it is only the same size as a statically linked executable. The libpfpro.so is almost 700KB. My new .so is only 28K. That leads me to believe that I don't have a true .so file.
So, my question is: Is it possible to link an existing .so with a new c program, producing a new usable .so that contains everything from the original .so?
Any help would be greatly appreciated.