[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • 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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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