Axel Howind a écrit :
> compiling a small program that uses the MySQL++-library, I was
> wondering why I have to include mysql's include directory to my
> include path. Well, I know, otherwise the compiler won't be able to
> find the mysql headers. But once it took me hours to hunt down an
> error that turned out to be caused by two different libraries that had
> nothing to do with each other, but both installed a header file with
> the same name ("exception.h", if I remember well).
>
I think MySQL++ do this because it's the "normal" way to do.
You can't predict what is the MySQL header Path, so the best solution is
to use, in your makefile $(shell mysql-config --cflags).
This solution allow multiple instance of the MySQL Client. For example,
under Fedora/Redhat :
mysql-devel (MySQL 5.0.37)=> /usr/include/mysql
mysqlclient10-devel (MySQL 3.23.58) => /usr/include/mysql3/mysql
mysqlclient14-devel (MySQL 4.1.14/usr/include/mysql4/mysql
Regards