4 messages in com.mysql.lists.pluspluscompiling error| From | Sent On | Attachments |
|---|---|---|
| mikeB | 22 Jul 2003 17:39 | |
| Sinisa Milivojevic | 23 Jul 2003 03:46 | |
| mikeB | 23 Jul 2003 20:51 | |
| Sinisa Milivojevic | 24 Jul 2003 04:13 |
| Subject: | compiling error![]() |
|---|---|
| From: | mikeB (mbil...@hotmail.com) |
| Date: | 07/23/2003 08:51:55 PM |
| List: | com.mysql.lists.plusplus |
even if I #include "windows.h" before the #include <mysql.h> I still get the
errors
..\mysql\include\mysql_com.h(115) : error C2146: syntax error : missing ';'
before identifier 'fd'
..\mysql\include\mysql_com.h(115) : error C2501: 'SOCKET' : missing
storage-class or type specifiers
..\mysql\include\mysql_com.h(115) : error C2501: 'fd' : missing storage-class or
type specifiers
but if I use #include <mysql++> I just get warnings and no errors.
btw I'm trying to use mysql++ in the half-life sdk ... (which is a game.. if you
didnt know already).
How can i get rid of all these errors or warnings??
warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance
warning)
warning C4800: 'unsigned int' : forcing value to bool 'true' or 'false'
(performance warning)
warning C4273: 'strtol' : inconsistent dll linkage. dllexport assumed.
warning C4355: 'this' : used in base member initializer list
warning C4355: 'this' : used in base member initializer list
warning C4786:
'?$pair@Viterator@?$_Tree@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@2@
U_Kfn@?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@H@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$alloc
ator@H@2@@std@@_N' : identifier was truncated to '255' characters in the browser
information
=========================================================================
I've set up mysql++ on windows msvc++ and have compiled the examples with no errors (and the exe works fine also.. accesses the database perfectly).
I am now trying to compile with another project and I'm getting these errors.
..\mysql\include\mysql_com.h(115) : error C2146: syntax error : missing ';' before identifier 'fd'..\mysql\include\mysql_com.h(115) : error C2501: 'SOCKET' : missing storage-class or type specifiers..\mysql\include\mysql_com.h(115) : error C2501: 'fd' : missing storage-class or type specifiers
I've searched this error on google and found other people with the same problem, but I couldnt find anything about the solution to it.
the include #include <mysql.h> is the last one in the includes .. on the file I'm using.
here is the code i'm using below.. which is just a test to get the database working..
Hi!
You should include windows.h before any mysql includes.
--
Regards,
-- For technical support contracts, go to https://order.mysql.com/?ref=msmi __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB /_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator <___/ www.mysql.com Larnaca, Cyprus




