8 messages in com.mysql.lists.win32Re: my_global.h mysql.h| From | Sent On | Attachments |
|---|---|---|
| Derick Smith | 17 Apr 2003 08:19 | |
| oceanare pte ltd | 17 Apr 2003 08:57 | |
| vze2...@verizon.net | 17 Apr 2003 09:35 | |
| vze2...@verizon.net | 17 Apr 2003 09:38 | |
| Martin | 17 Apr 2003 10:37 | |
| Stephen Fromm | 17 Apr 2003 11:03 | |
| Martin | 17 Apr 2003 11:17 | |
| Derick Smith | 22 Apr 2003 10:25 |
| Subject: | Re: my_global.h mysql.h![]() |
|---|---|
| From: | vze2...@verizon.net (vze2...@verizon.net) |
| Date: | 04/17/2003 09:35:24 AM |
| List: | com.mysql.lists.win32 |
From: "Derick Smith" <niag...@hotmail.com> Date: 2003/04/17 Thu AM 10:19:48 CDT To: mys...@lists.mysql.com, win...@lists.mysql.com Subject: my_global.h mysql.h
Hi! Does anyone have any experience using mysql in different libraries then linking them into one executable?
I would like to use one persistent mysql connection for all the libraries and store the MYSQL* connection as a data structure in one of the libraries.
I am using VC++6.0 and I am having problems linking libraries. The global header file does not recognize mysql data types: mysqldbi.h(130) : error C2081: 'MYSQL_ROW' : name in formal parameter list illegal
I can compile libraries separately with: #include <my_global.h> #include <mysql.h> but, when I include these in the global header files OR the c program of the executable I get many of the following compile errors: C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(357) : error C2467: illegal declaration of anonymous 'struct' C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(376) : error C2467: illegal declaration of anonymous 'struct' :\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(1519) : error C2054: expected '(' to follow '_inline'
Any suggestions?
I had similar problems and will go on a hunch that the cause is the same.
You can look at my old posts (if you don't save all msgs, try looking at a
USENET archive, like
http://groups.google.com
).
In a nutshell, the problem *I* had was that the mysql *.h files had #define
statements that goofed up the standard library headers. (I was
working with gnu C++ on a Linux box.) The particular problems *I* had were that
one of the MySQL *.h files #define'd swap, and this goofed up
something in a C++ standard header. The other problem was that my_ctype.h
(included by one of the MySQL headers I explicitly included) goofed
up the ctype.h stuff (which some C++ header included).
Hope this helps,
sjfromm




