Solved

Compiling C Program to access mysql, issues with libmysqlclient.so

Posted on 2009-07-13
3
416 Views
Last Modified: 2012-05-07
I am trying to compile a program to access a mysql database. I get the following error:
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient

I have this compiled on a different machine and works. This machine is running Fedora Enterprise 5 and has a 64-bit processor. I have the 32 bit mysql and all the libraries installed. It appears to find it, but thinks its incompatible. Anyone had any experience with this?
0
Comment
Question by:tekkieguru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:tekkieguru
ID: 24842267
These are installed:
MySQL-server-community-5.1.36-0.rhel5
MySQL-shared-compat-5.1.36-0.rhel5
MySQL-devel-community-5.1.36-0.rhel5
MySQL-client-community-5.1.36-0.rhel5
0
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 24842314
>> This machine is running Fedora Enterprise 5 and has a 64-bit processor.
Are you trying to build with 32 bit or 64 bit compiler/bintools?
0
 

Author Comment

by:tekkieguru
ID: 24842699
I was trying to build it with the 32-bit version. Just removed all the 32 bit mysql and libraries and loaded the 64-bit ones. Its working now. :) have some points :D
0

Featured Post

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question