• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

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

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
tekkieguru
Asked:
tekkieguru
  • 2
1 Solution
 
tekkieguruAuthor Commented:
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
 
evilrixSenior Software Engineer (Avast)Commented:
>> 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
 
tekkieguruAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now