dbTalk Databases Forums  

Issue with sql_create

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


Discuss Issue with sql_create in the mailing.database.mysql-plusplus forum.



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

Default Issue with sql_create - 07-25-2006 , 02:11 PM






------=_NextPart_000_000F_01C6AFE3.04BFBF30
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello all,



I'm having an issue at compile-time with the sql_create macro. Here is
the code snippet and the subsequent compile errors:



Code:

------------------------------------------

#include "util.h"

#include <mysql++.h>

#include <custom.h>



#include "db_main.h"



#include <iostream>

#include <iomanip>

#include <vector>



using namespace std;

using namespace mysqlpp;



//Create player data structure

sql_create_2(player,

1,2,

string, player_name,

string, player_pass)



Error:



Compiling...

db_main.cpp

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : error
C2751: 'player::names' : the name of a function parameter cannot be
qualified

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : error
C2143: syntax error : missing ')' before '{'

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : error
C2059: syntax error : ')'

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : error
C2143: syntax error : missing ';' before '}'

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : warning
C4508: 'MYSQLPP_SSQLS_EXPAND' : function should return a value; 'void'
return type assumed

e:\Project Venturer\Engine\3D\SDK\engine\database\db_main.cpp (33) : error
C2059: syntax error : ')'





I'm using Visual Studio 2003 and have re-compiled the custom.h header using
the Perl script custom.pl -v It almost looks like there is some namespacing
issue when the macro is trying to qualify the names[] parameter in the
header. I have a feeling that I'm leaving something out somewhere but I'm
not sure what it could be. Any help with this would be greatly appreciated!




Chris


------=_NextPart_000_000F_01C6AFE3.04BFBF30--


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Issue with sql_create - 07-25-2006 , 03:42 PM






Chris (Clu) Miller wrote:
Quote:
sql_create_2(player,

1,2,

string, player_name,

string, player_pass)
This code's legal...I just dropped it into custom1.cpp and it compiled
fine. Try that on your end, just to be sure.

If it compiles in custom1.cpp, something's wrong with your project, or
the build settings. For instance, are you sure you don't have a struct
or class player somewhere else in your project? Anything like that
could cause this sort of problem.

If it doesn't build in custom1.cpp....well, that would be weird. VC++
2003 hasn't generally had problems with SSQLS.

--
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   
AT
 
Posts: n/a

Default RE: Issue with sql_create - 07-25-2006 , 05:10 PM



I'll give compiling some of the examples a go.

Seems to me like it really is something in the way I have my project set up
since I've pretty much copied and pasted every example I could find into my
code with no success.

I'll scrutinize the example projects and make sure I don't have something
gummed up somewhere.

Thanks!

Chris

-----Original Message-----
From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]
Sent: Tuesday, July 25, 2006 1:41 PM
To: MySQL++ Mailing List
Subject: Re: Issue with sql_create

Chris (Clu) Miller wrote:
Quote:
sql_create_2(player,

1,2,

string, player_name,

string, player_pass)
This code's legal...I just dropped it into custom1.cpp and it compiled
fine. Try that on your end, just to be sure.

If it compiles in custom1.cpp, something's wrong with your project, or
the build settings. For instance, are you sure you don't have a struct
or class player somewhere else in your project? Anything like that
could cause this sort of problem.

If it doesn't build in custom1.cpp....well, that would be weird. VC++
2003 hasn't generally had problems with SSQLS.

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



--
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
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.