From: Warren Young Date: December 18 2007 6:19pm Subject: Re: Linking errors after moving to SSQLSs, macro problem List-Archive: http://lists.mysql.com/plusplus/7280 Message-Id: <47680F47.8040104@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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.