List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 5 2006 2:28pm
Subject:Re: Building MySQL++ 2.1.1 with MinGW
View as plain text  
Joel Fielder wrote:
>>> 	To eliminate the warning, replace the declaration of 
>>> ResUse::operator= (result.h:92) with the definition of
> ResUse::operator=
>>> (result.h:622) so that 	the function is defined within the class
> body of
>> Without seeing the exact text of the warning, there's no way I'm making
>> that change.  I'm not going to just blindly appease the compiler.
> Linker warning:
> warning: 'mysqlpp::ResUse& mysqlpp::ResUse::operator=(const
> mysqlpp::ResUse&)' defined locally after being referenced with dllimport
> linkage

Oh, it's demented.  Result::operator=() never is declared dllimport. 
This must have to do with the changes to the way DLL linkage is handled 
automatically now.  It's incorrectly deciding it's an exported function 
instead of an inline one.

I suppose if we have to hoist this inline up into the class definition, 
we have to do it for all of them.  I don't see anything that would make 
this one operator special in that regard.

It's on the Wishlist now, for v2.2.

>> Interesting.  I don't understand why you have to do that to classes, 
>> since the class proper isn't part of the DLL's interface; only its 
>> member functions are.
> My guess is that it's something to do with inheritance, and that placing
> MYSQLPP_EXPORT in front of the class declaration ensures that members
> from the base classes are properly exported also.  


>> Do you know if this works with VC++?  If it breaks that, I won't be 
>> applying it.
> I'm sure it will work:
>, but confirmation
> would be nice from someone running Visual C++ :)

The MSDN library is confidence enough for me.  It'll certainly get 
tested before release, but I don't anticipate problems now.  Thanks for 
chasing this reference down.
Building MySQL++ 2.1.1 with MinGWJoel Fielder29 Jun
  • Re: Building MySQL++ 2.1.1 with MinGWWarren Young30 Jun
    • Re: Building MySQL++ 2.1.1 with MinGWCarlos Flores30 Jun
    • Re: Building MySQL++ 2.1.1 with MinGWJoel Fielder3 Jul
      • Re: Building MySQL++ 2.1.1 with MinGWWarren Young5 Jul