|
|||||||||||
|
MySQL include paths
From: Axel Howind <Axel.Howind(at)htp-tel.de>
Date: Sun Jul 08 2007 - 16:06:41 EDT
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). That's why now I pretty much dislike adding everything to my include path. Instead I for example write #include <mysql/mysql_version.h> and keep the include path short. But I can't do this with MySQL++, since MySQL++ relies on having the MySQL headers in the include path. Would a patch to the MySQL++ headers be accepted to include mysql headers in the <mysql/...> way? Some programs makefiles (or MSdev-settings) would possibly have to be changed if mysql headers are installed in nonstandard locations. So, what do you think? Axel PS: Here's a patch against todays svn, if you want to give it a try... Index: lib/coldata.h
-#include <mysql.h>
#include <typeinfo>
-#include <mysql_version.h>
// Work out major platform-specific stuff here.
// MySQL header. Basically, the above largely replaces MySQL's my_global.h // while actually working with C++. This is why we disobey the MySQL // developer docs, which recommend using my_global.h.-#include <mysql.h> +#include <mysql/mysql.h>
namespace mysqlpp {
-#include <mysql.h>
#include <deque>
-#include <mysql.h>
#include <iostream> Index: lib/query.h
-#include <mysql.h>
#include <deque>
-#include <mysql.h>
#include <map>
#include "common.h"
-#include <mysql.h>
#include <map> -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=lists@pantek.comReceived on Sun Jul 8 16:06:54 2007 This archive was generated by hypermail 2.1.8 : Tue Jul 10 2007 - 21:34:35 EDT |
||||||||||
|
|||||||||||