You are not logged in.

#1 2010-03-13 12:42:04

pivonroll
Member
Registered: 2009-04-24
Posts: 30

cannot compile db2 application [SOLVED]

OK ppl i really need your help.
I'm trying to compile a db2 program.
I have a sqc file.
I have done:
db2 prep 13.sqc bindfile
db2 bind 13.bnd
gcc -I$DB2DIR/include -I~/sqllib/include -c 13_01.c

and then when i try to do:
gcc -o program 13_01.o -Wl,-rpath,~/sqllib/lib32 -L~/sqllib/lib32 -ldb2
i get the following error:
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status

I have LD_LIBRARY_PATH=/home/db2inst2/sqllib/lib32 and DB2 is version 9.7.

I have googled and googled and googled but i don't find the solution.
Can someone pls help me I need this so I can prepare for my exams but in classes they only teached us to do this on Windows and I don't like to work in it. I have tried even in Windows, but there I get some really crazy errors (not that I have used different method to try compiling it on Windows, method that they thought us in classes).

Thank you!

Last edited by pivonroll (2010-03-13 13:11:26)

Offline

#2 2010-03-13 12:54:26

pivonroll
Member
Registered: 2009-04-24
Posts: 30

Re: cannot compile db2 application [SOLVED]

OMG
i did it.
I just changed ~/sqllib/lib32 to /opt/ibm/db2/V9.7/lib32 and it worked!

Offline

Board footer

Powered by FluxBB