From: Warren Young Date: August 19 2004 7:11pm Subject: Re: microsoft compilation List-Archive: http://lists.mysql.com/plusplus/3385 Message-Id: <4124FB61.7040608@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit ahnkle wrote: > > I would really like to see MS support for mysql++ if at all possible. By which you really mean: > compile with v6 Guys, VC++6 is _six years old_. It had the worst Standard C++ support of any compiler in its time. I won't hold MySQL++ hostage to such a weak compiler. This isn't anti-Microsoft bias. MySQL++ doesn't build under six year old versions of GCC, either. It's time to move forward. If there are problems in the recent Microsoft C++ compilers that cause MySQL++ not to build, I'll certainly entertain fixes. > How do you feel about a directive that could expand to > __declspec(dllexport) or __declspec(dllimport) as necessary? > > e.g. > > #ifdef _MSC_VER > #ifdef EXPORTING > #define MYSYMBOL_EXPORT __declspec(dllexport) > #else > #define MYSYMBOL_EXPORT __declspec(dllimport) > #endif // #ifdef EXPORTING > #endif // #ifdef _MSC_VER > > ... > > class MYSYMBOL_EXPORT Connection > { > ... > }; I'd rather you called the macro MYSQLPP_MS_EXPORT. Also, if that EXPORTING macro is supposed to be defined by the modules using the DLL, use something like MYSQLPP_MS_IMPORT. The idea here is to minimize the possibility of global namespace clashes. Please submit a patch against the current version. Also, if you could submit a VC++ project file, I will include it in the distribution.