[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-plusplus
Subject:    Re: Why cant I define more than two sql_create_# macro?
From:       Warren Young <mysqlpp () etr-usa ! com>
Date:       2010-01-11 13:10:07
Message-ID: 5FCFBE76-2DF6-4C04-8F5A-FA48A79B7B34 () etr-usa ! com
[Download RAW message or body]

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
-- 
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:    http://lists.mysql.com/plusplus?unsub=mysql-plusplus@progressive-comp.com



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic