|List:||MySQL++||« Previous MessageNext Message »|
|From:||Warren Young||Date:||July 6 2005 5:51pm|
|Subject:||Re: static globals in SSQL macro expansion -> multiple definition|
|View as plain text|
Wolfram Arnold wrote: > While we're talking about wish-lists for version 2.0, News to me. Since the beta was just released, the v2.0 feature set is frozen, as far as I'm concerned. (To me, beta means "feature-complete, but may have bugs.") That's not to say that I'm not accepting patches for v2.0. Just that it's a little late... > The SSQL macro expansion will create static globals that are being > defined (assinged) as part of the macro. This has been on the Wishlist for a long time. The copy you have in your 1.7.35 version has it...look for "static". I point that out because it contains two suggestions for fixing it as well. I added a third possibility recently: "...redesign the SSQLS mechanism entirely. Instead of defining SSQLSes by instantiating macros, you could declare the structure in, say, an XML format, which could be tranformed (XSLT? Perl + SAX?) into code very much like in the current SSQLS macros, except that it would generate separate .cpp and .h files for each structure. In addition to solving the static member problem, it would have other advantages, like side-stepping the Borland C++ macro size limit." I like this a lot better than the other two choices. The macros are ugly and unmaintainable. We have the technology to build a better mechanism. This would not be a trivial patch, of course.