List:MySQL++« Previous MessageNext Message »
From:Stephen Povilaitis Date:January 17 2006 5:59pm
Subject:SSQLS compilation errors when KEYS = 0
View as plain text  
Most exalted ones,

I'm using gcc 3.4.3 on Redhat Enterprise Linux with MySQL 4.0.1 and mysql++ 2.0.4.

I'm having some issues trying to use SSQLS that I would appreciate some help with.

If I try to use the following code from the manual I get errors:

using namespace std;
using namespace mysqlpp;

sql_create_5(stock, 0, 0,     // KEYS value is 0
	string, item,
	int, num,                  
	double, weight,  
	double, price,  
	mysqlpp::Date, date)

When compiling I get these errors:

:33: error: expected primary-expression before ',' token
33: error: `value' undeclared (first use this function)
33: error: `NUM' undeclared (first use this function)
33: error: there are no arguments to `sql_compare_type_def_NUM' that depend on a template
parameter, so a declaration of `sql_compare_type_def_NUM' must be available
33: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of
an undeclared name is deprecated)
33: error: expected primary-expression before ',' token
33: error: `field' undeclared (first use this function)
33: error: `NUM' undeclared (first use this function)
33: error: there are no arguments to `sql_compare_type_def_NUM' that depend on a template
parameter, so a declaration of `sql_compare_type_def_NUM' must be available
33: error: expected primary-expression before ',' token
33: error: `NUM' undeclared (first use this function)
33: error: there are no arguments to `sql_compare_type_defe_NUM' that depend on a template
parameter, so a declaration of `sql_compare_type_defe_NUM' must be available
33: instantiated from here
:33: error: `sql_compare_type_def_NUM' undeclared (first use this function)
33: instantiated from here
33: error: `sql_compare_type_def_NUM' undeclared (first use this function)
33: instantiated from here
33: error: `sql_compare_type_defe_NUM' undeclared (first use this function)

Yet if I change the SSQLS Macro call to:

sql_create_5(stock, 1, 0,     // KEYS value is 1st field
	string, item,
	int, num,                  
	double, weight,  
	double, price,  
	mysqlpp::Date, date)

everything works fine.

What is going on here? According to the manual 0 should always work for the KEYS and
INITPARMS fields.

thanks in advance,

Steve Povilaitis



Thread
SSQLS compilation errors when KEYS = 0Stephen Povilaitis17 Jan
  • Re: SSQLS compilation errors when KEYS = 0Warren Young17 Jan