Trouble trying to use Shared Libraries with AIX 3.2.5
Posted in 1997
I am using AIX 3.2.5 and Informix On-line 5.08UC. The version of the c4gl is 4.14 which allows the use of shared libraries. I have built a couple of very simple 4gl's to test against. One is the main program. Another is a library I would like to use with the main. I can build this library as non-shared and compile my main program to use Informix's shared library and link mine library in with no problems. The problem comes into play when I try to build my library as a shared library and try to build the main program using both my shared library and Informix's shared library. AIX 3.2.5 requires certain options passed to the linker to build a shared library. I have used these options to try to my shared library and have found the following: 1. My shared library will successfully build if I do not have any calls to functions which are external to my library and any other library that gets linked. I have used this with my simple main program and it works very well. 2. If my library has any calls to a function which is defined in my main program, but the function is not defined in my shared library, the linker gives an error about "Unresolved symbols". I have exported all functions within my library. Has anyone done this using AIX 3.2.5? Am I missing something here? Is this an AIX 3.2.5 limitation or is there an option I need to give to the linker? Unfortunately, I must be able to do option 2 above as we have numerous libraries which already include these external calls. Bottom line: If I cannot do option 2, we cannot use our own libraries as shared. Any help would be appreciated. If I haven't given enough information to go on, I can provide more.