dbTalk Databases Forums  

Visual C++ 7.1. compiler error when including custom.h

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Visual C++ 7.1. compiler error when including custom.h in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tim Stewart
 
Posts: n/a

Default Visual C++ 7.1. compiler error when including custom.h - 04-03-2006 , 11:51 AM






------=_Part_8995_30167820.1144083064239
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I am using MySQL 5.0.19 and MySQL++ 2.1.0 under Visual Studio 7.1.

The following code compiles with an error:

#include <mysql++.h>
#include <custom.h>

int main(int argc, char* argv[])
{
return 0;
}


The errors:

error C2010: '.' : unexpected in macro formal parameter list
error C2010: '.' : unexpected in macro formal parameter list
error C2010: '.' : unexpected in macro formal parameter list

I am including custom.h in order to use the sql_create_2 macro.

Tim

------=_Part_8995_30167820.1144083064239--

Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Visual C++ 7.1. compiler error when including custom.h - 04-05-2006 , 12:01 AM






Tim Stewart wrote:
Quote:
error C2010: '.' : unexpected in macro formal parameter list
Alas, this is because VC++ 2003 doesn't support variadic macros, used by
a new feature in MySQL++ v2.1. That feature allows you to #include a
file containing an SSQLS definition in multiple modules and avoid a
linker error resulting from the static variable definitions in some
SSQLS macros.

In the upcoming MySQL++ v2.1.1, I've added a feature to custom.pl to
disable this feature, which will fix this problem. You will need a Perl
interpreter to run the custom.pl script. Alternately, you can manually
hack out the MYSQLPP_SSQLS_NO_STATICS stuff in custom.h and custom-macros.h.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Tim Stewart
 
Posts: n/a

Default Re: Visual C++ 7.1. compiler error when including custom.h - 04-05-2006 , 09:33 AM



------=_Part_21107_12227449.1144247588635
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thanks, Warren!

I had hoped to use the sql_create_X macros. Do I need to upgrade to Visual
C++ 2005?

Thanks again!

On 4/4/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Tim Stewart wrote:

error C2010: '.' : unexpected in macro formal parameter list

Alas, this is because VC++ 2003 doesn't support variadic macros, used by
a new feature in MySQL++ v2.1. That feature allows you to #include a
file containing an SSQLS definition in multiple modules and avoid a
linker error resulting from the static variable definitions in some
SSQLS macros.

In the upcoming MySQL++ v2.1.1, I've added a feature to custom.pl to
disable this feature, which will fix this problem. You will need a Perl
interpreter to run the custom.pl script. Alternately, you can manually
hack out the MYSQLPP_SSQLS_NO_STATICS stuff in custom.h and
custom-macros.h.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...mail (DOT) com


------=_Part_21107_12227449.1144247588635--


Reply With Quote
  #4  
Old   
Warren Young
 
Posts: n/a

Default Re: Visual C++ 7.1. compiler error when including custom.h - 04-05-2006 , 11:04 AM



Tim Stewart wrote:
Quote:
I had hoped to use the sql_create_X macros.
Please re-read what I wrote, and the v2.1.0 change log entry. This new
feature only makes it possible to use SSQLS in broader contexts than
before. If you cannot use the feature, you get to use SSQLS with the
same limitations that we dealt with on all platforms.

Quote:
Do I need to upgrade to Visual C++ 2005?
Well, plainly there are compensations.

I'm curious: why aren't you on MSDN? I ask only to more broadly
understand the situation of the MySQL++ user base.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Tim Stewart
 
Posts: n/a

Default Re: Visual C++ 7.1. compiler error when including custom.h - 04-05-2006 , 11:06 AM



------=_Part_21664_24217898.1144253201972
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

My companies products all are built under Visual C++ 2003. We will
eventually upgrade to 2005 but it hasn't happened yet.

On 4/5/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Tim Stewart wrote:

I had hoped to use the sql_create_X macros.

Please re-read what I wrote, and the v2.1.0 change log entry. This new
feature only makes it possible to use SSQLS in broader contexts than
before. If you cannot use the feature, you get to use SSQLS with the
same limitations that we dealt with on all platforms.

Do I need to upgrade to Visual C++ 2005?

Well, plainly there are compensations.

I'm curious: why aren't you on MSDN? I ask only to more broadly
understand the situation of the MySQL++ user base.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...mail (DOT) com


------=_Part_21664_24217898.1144253201972--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.