#15 makefile correction needed on unix

open
nobody
None
5
2009-11-03
2009-11-03
No

The libHBAAPI.so has a library dependency on libdl.so because of the "dlopen" function call it makes. However, the makefile.unix has the "-ldl" linker option in hbatest.c not libhbaapi.so. Here is a copy of the relevant lines in the makefile:

hbatest: hbaapi.h
${CC} hbatest.c -ldl -o hbatest

libHBAAPI.so: HBAAPILIB.c hbaapi.h vendorhbaapi.h
${VERS}
${CC} HBAAPILIB.c version.o ${CFLAGS} -DBUILD_DATE=\"'${BUILD_DATE}'\" -G -o libHBAAPI.so
@rm version.o

Thus, the -ldl needs be moved out of hbatest.c logic shown above and into the libHBAAPI build logic. Because this is not currently done, the libHBAAPI.so will work with the HBAAPI client apps this project is building (e.g. hbatest.c) but will not work when the libHBAAPI.so is built with other (3rd party) apps who don't use -ldl. Again, the issue here is that libHBAAPI.so should include the -ldl (link with libdl.so) compiler option because it is the code that make the dlopen (libdl.so) function call. We had to fix our 3rd party client to include -ldl in our client makefile as a workaround so we could use this libHBAAPI shared object library. The linux "ldd" command can be run on the hbaapi executable and shared object binary files to also verify this issue.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks