I'm trying to make a small DLL to make simple administrative manipulations on DB2 (create/drop database, display active databases etc.). I did include sqlenv.h, and did specify the SQLLIB/lib and db2api.lib in the linking. Still, this is what I get:
Code: Select all
$ gcc -Wall -L"/home/alex/sqllib/lib" "/home/alex/sqllib/lib/db2api.lib" -share
d dboperations.o -o dbops.dll
dboperations.o:dboperations.cpp:(.text+0x53): undefined reference to `sqlecrea_a
pi@32'
dboperations.o:dboperations.cpp:(.text+0xac): undefined reference to `sqledosd_a
pi@16'
dboperations.o:dboperations.cpp:(.text+0xfd): undefined reference to `sqlengne_a
pi@12'
collect2: ld returned 1 exit status
Thanks.