List:MySQL++« Previous MessageNext Message »
From:Chris \(Clu\) Miller Date:July 25 2006 7:08pm
Subject:Issue with sql_create
View as plain text  
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


Thread
Issue with sql_createChris \(Clu\) Miller25 Jul
  • Re: Issue with sql_createWarren Young25 Jul
    • RE: Issue with sql_createChris \(Clu\) Miller26 Jul