I hate this fix but…

I spent the night doing a lot of coding, some great code, if I say so myself. But my code is dependent on 3 Libraries, one written by me, and 2 others by other people. I include the headers for the first library, all is fine, and works well, I include the next library, and I find that a library it uses, causes MAJOR issues with the first library that I included into my code. The library that is causing all the problems is the mysql++ library. The do a lot of defines of common terms that a lot of programmers might use, such as “UNKNOWN”, and them being define and not anything else they are persistent though the include chain after their include files are called. And there are many of these, so to have a bunch of undefs is not an option. I so I finally broke down and use another hack fix that I don’t like but it is better, I do a “extern class object” this will allow me to use the object and all its functions with out polluting my namespace, and just link it in at the last minute. But I have a bad feeling that this will come back to haunt me in the linker down the road.

 Post details 

Categories: Technology
Tags: No Tags
Published on: April 20, 2005

 © 2024 - Michael P. O'Connor