Hello,

I've developed my project using C language on Linux platform. When I compiled my program, I got some linkage errors. I've read in some other C forum that the errors I'm getting is due to a linkage problem with the libraries. Can someone tell me the proper steps to fixing this problem. Here is the error messages:

[srb@fsktm src]$ gmake
/home/srb/SRB3_4_2/mySRB/src/alpha1.c:12723: undefined reference to `SQLAllocHandle'
alpha1.o(.text+0x296f6):/home/srb/SRB3_4_2/mySRB/src/alpha1.c:12724: undefined reference to `SQLSetEnvAttr'
alpha1.o(.text+0x29738):/home/srb/SRB3_4_2/mySRB/src/alpha1.c:12727: undefined reference to `SQLDrivers'
collect2: ld returned 1 exit status
gmake: *** [etd.cgi] Error 1

Thanks in advance.

Regards,
SYT

You need to link the sql libraries as well.

How can I link sql libraries?
Thanks.

Open your makefile , in linker command add -l sql (check actual name of libsql.a)

I'm new to C language and Linux OS. Could you please tell me the linkage command to write in the make file?
Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.