Solved

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

Posted on 2009-07-13
3
410 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

808 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