Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-07-13
3
Medium Priority
?
423 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
  • 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
How much do you know about the future of data centers? If you're like 50% of organizations, then it's probably not enough. Read on to get up to speed on this emerging field.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

877 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