LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 11-09-2003, 07:03 AM   #1
LOUDSilence
Member
 
Registered: Oct 2003
Location: Sydney
Distribution: Red Hat 8
Posts: 77

Rep: Reputation: 15
Question Link probs


Hi everyone,

I dont know if this is the right place to ask this question. but this is the only place like this
I am registed with and I use linux so I thought I would give it a go.

I am trying to link libmysqlclient.so to my C program but don't know how. It can not find the library file

$ ld -llibmysqlclient.so
ld: cannot find -llibmysqlclient.so

$ ld -l/usr/lib/libmysqlclient.so
ld: cannot find -l/usr/lib/libmysqlclient.so

I am using Anjuta as my IDE, but at the monment I just want to know how to find the libraries. I am a working programmer but Windows Borland C++, moving all the code over to Linux as the licences are cheaper for the company

Please let me know if you need more information.

Thanks
 
Old 11-09-2003, 02:31 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Hello,
I've just moved your question to the Programming forum. Member Intro is a good place to say 'hello', but it's not the best place for questions. Please try to choose the right forum before posting. I think that your questions fits Programming best, so it's moved.

Now, the answer.
You need to use -lmysqlclient
When you're using -l option, you remove 'lib' profix and '.so' suffix (and all version numbers). It may not be enough, because includes for such a client may not in standard directories - then you need to use -L option, too.
 
Old 11-09-2003, 10:36 PM   #3
LOUDSilence
Member
 
Registered: Oct 2003
Location: Sydney
Distribution: Red Hat 8
Posts: 77

Original Poster
Rep: Reputation: 15
Thanks Mara, problem solved...
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadcom BCM4401 NIC: Link is Down, Link is up mr.wobble Linux - Hardware 6 08-31-2007 10:48 AM
Soft Link and Hard Link Moataz Red Hat 1 04-25-2005 06:30 AM
OpenBSD 3.6 install D-Link 300T / D-Link DFE 528TX lesleyb *BSD 2 04-01-2005 06:29 PM
Wake on Lan - Link on b4 power up, No Link light after shutdown? Mark007 Linux - Networking 0 11-20-2004 08:16 PM
eth1... failed; no link present. Check Link? illegalien Linux - Networking 3 11-03-2002 10:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration