20 messages in com.mysql.lists.plusplusRe: Linking errors after moving to SS...| From | Sent On | Attachments |
|---|---|---|
| Simon Pickles | 12 Dec 2007 14:16 | |
| William F. Dowling | 12 Dec 2007 14:26 | |
| Warren Young | 12 Dec 2007 14:34 | |
| Simon Pickles | 16 Dec 2007 14:22 | |
| Warren Young | 17 Dec 2007 05:56 | |
| Simon Pickles | 17 Dec 2007 11:59 | |
| Warren Young | 17 Dec 2007 13:19 | |
| Simon Pickles | 17 Dec 2007 14:11 | |
| Joel Fielder | 17 Dec 2007 14:36 | |
| Drew M. | 17 Dec 2007 15:26 | |
| Simon Pickles | 18 Dec 2007 00:07 | |
| Warren Young | 18 Dec 2007 10:15 | |
| Warren Young | 18 Dec 2007 10:19 | |
| Warren Young | 18 Dec 2007 10:25 | |
| Simon Pickles | 18 Dec 2007 12:42 | |
| Warren Young | 18 Dec 2007 13:47 | |
| Jim | 19 Dec 2007 03:50 | |
| Warren Young | 19 Dec 2007 08:45 | |
| Jim | 20 Dec 2007 03:50 | |
| Warren Young | 20 Dec 2007 18:16 |
| Subject: | Re: Linking errors after moving to SSQLSs, macro problem![]() |
|---|---|
| From: | Jim (ji...@fayettedigital.com) |
| Date: | 12/19/2007 03:50:33 AM |
| List: | com.mysql.lists.plusplus |
Warren Young wrote:
Joel Fielder wrote:
This is how I did it, but maybe my way is "wrong", Warren will tell me no doubt :)
Okay, I accept. :)
The macros in the header and the cpp must be identical.
There's the problem. It's easy to make them identical once. It's less easy to remember to update both copies any time one has to change. Duplicate code is always at risk of drift.
If you need a declaration in multiple places, it goes in a header file; that's why they were invented.
All we're doing with these MYSQLPP_SSQLS_NO_STATICS games is choosing where the *definition* goes, because there can be only one of those.
I fought with this recently. I finally got it to work, but I still have a question. What is the purpose of the static elements that are eliminated by defining MYSQLPP_SSQLS_NO_STATICS? Would it be OK to always do that and eliminate the problem? Or is it require to make ssqls work?
Thanks, Jim.




