On Jan 11, 2010, at 3:05 AM, lee wrote:
> I want to define two ssql in one .h file, like this:
> #ifndef MYCC_H
> #define MYCC_H
> #define MYSQLPP_SSQLS_NO_STATICS
The last line isn't conditional, as it recommends in the user manual when you put the
#define in a *.h file rather than in *.cpp. This means no module in your program defines
the static members of these SSQLSes, which is what the linker is yelling about:
> mycc.o: In function `table1::table() const':
> /usr/include/c++/4.2/bits/ios_base.h:629: undefined reference to `table1::table_'
It has nothing to do with the fact that you have two SSQLSes here. Re-read this section
of the manual:
http://tangentsoft.net/mysql++/doc/html/userman/ssqls.html#ssqls-in-header