User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 423,287 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,293 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 338 | Replies: 4
Reply
Join Date: Feb 2008
Posts: 3
Reputation: SYT is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
SYT SYT is offline Offline
Newbie Poster

Need urgent help: Linkage error with the library

  #1  
Feb 24th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: ★ ijug.net ★
Posts: 929
Reputation: ithelp will become famous soon enough ithelp will become famous soon enough 
Rep Power: 5
Solved Threads: 66
ithelp ithelp is offline Offline
Posting Shark

Re: Need urgent help: Linkage error with the library

  #2  
Feb 25th, 2008
You need to link the sql libraries as well.
Reply With Quote  
Join Date: Feb 2008
Posts: 3
Reputation: SYT is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
SYT SYT is offline Offline
Newbie Poster

Re: Need urgent help: Linkage error with the library

  #3  
Feb 25th, 2008
How can I link sql libraries?
Thanks.
Reply With Quote  
Join Date: May 2006
Location: ★ ijug.net ★
Posts: 929
Reputation: ithelp will become famous soon enough ithelp will become famous soon enough 
Rep Power: 5
Solved Threads: 66
ithelp ithelp is offline Offline
Posting Shark

Re: Need urgent help: Linkage error with the library

  #4  
Feb 25th, 2008
Open your makefile , in linker command add -l sql (check actual name of libsql.a)
Last edited by ithelp : Feb 25th, 2008 at 3:04 am.
Reply With Quote  
Join Date: Feb 2008
Posts: 3
Reputation: SYT is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
SYT SYT is offline Offline
Newbie Poster

Re: Need urgent help: Linkage error with the library

  #5  
Feb 27th, 2008
I'm new to C language and Linux OS. Could you please tell me the linkage command to write in the make file?
Thanks.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the C Forum

All times are GMT -4. The time now is 10:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC