On Mon, 25 Nov 2002, Ruurd Reitsma wrote: > judging from the mailing list, building on win32 is quite popular, so here's > another approach. (AFAIK a mingw .dll cannot be debugged when used with a MSVC > app, and the MSVC port seems a bit crude) > > When using Visual Studio 6 with Intel C++ 6.0 & STLport, the aspell .dll > (vanilla 0.50.2) compiles with a few small hickups. That is, when combining > commom with the aspell lib into one .dll, and adding the proper dllexport > nonsense to the C frontend.
The same way it is required for VC++? > The only error I'm getting is: > > D:\Dev\aspell-0.50.2\common\config.cpp(433): error: more than one user-defined > conversion from "acommon::PosibErr<acommon::String>" to "acommon::String" > applies: > function "acommon::String::String(acommon::ParmString)" > function "acommon::String::String(const acommon::String &)" > String s1 = retrieve(replace); > > This can be circumvented by commenting out: > > String(ParmString s) : std::string(s) {} > > in the String class, and changing this back and forth during compilation. The > result is a .dll that is binary compatible with VC++. > > Any hints on fixing this one error? That attached patch should fix the problem. -- http://kevin.atkinson.dhs.org
Index: common/posib_err.hpp =================================================================== RCS file: /cvsroot/aspell/aspell/common/posib_err.hpp,v retrieving revision 1.10 diff -u -r1.10 posib_err.hpp --- common/posib_err.hpp 11 Aug 2002 12:58:30 -0000 1.10 +++ common/posib_err.hpp 25 Nov 2002 21:12:12 -0000 @@ -202,6 +202,9 @@ // // + inline String::String(const PosibErr<String> & other) + : std::string(other.data) {} + inline String & String::operator= (const PosibErr<const char *> & s) { std::string::operator=(s.data); Index: common/string.hpp =================================================================== RCS file: /cvsroot/aspell/aspell/common/string.hpp,v retrieving revision 1.3 diff -u -r1.3 string.hpp --- common/string.hpp 30 Nov 2001 03:55:46 -0000 1.3 +++ common/string.hpp 25 Nov 2002 21:12:12 -0000 @@ -28,6 +28,7 @@ String(ParmString s) : std::string(s) {} String(const std::string & s) : std::string(s) {} String(const String & other) : std::string(other) {} + inline String(const PosibErr<String> & other); String & operator= (const char * s) { std::string::operator= (s); return *this;