Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Issue with sql_create

Issue with sql_create

2006-07-25       - By Chris (Clu) Miller

 Back
Reply:     1     2     3  

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!
:D



Chris