News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

C API for mysql with wrong references (urgent)

Started by geohei, January 01, 2017, 07:15:11 PM

Previous topic - Next topic

geohei

Hi.

Ubuntu 14.04 desktop.
Code::Blocks 16.01

I'm programming in C and would like to add MySQL code.
So I installed libmysqlclient-dev, which installs mysql.h and all other header files.

Unfortunately, these header files are all installed in /usr/include/mysql instead of /usr/include.
Cross references between the header files all expect them to be in /usr/include.
Changing of all references can't be the solution.
Nor can it be copying /usr/include/mysql to /usr/include.

Is there any feature inside Code::Blocks which allows to automatically map references to wrong header files?

Please advise.

Thanks,

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Jenna

The dev-package includes "mysql-config", which vcan be used similar to wx-config of wxWidgets on Linux.
You can add calls to the tool in backticks in compilers and linkers other options.
`mysql_config --cflags` in "Other compiler options" of your projects "Build options" and `mysql_config --libs` in "Other linker settings".
Using config-tools (or pkg-config if available) is better in most cases on linux, because you don't need to add everything manual and you don't have to care about possible changes in the directory-structure of the library.

geohei