List:MySQL++« Previous MessageNext Message »
From:Joel Fielder Date:July 3 2006 9:11am
Subject:Re: Building MySQL++ 2.1.1 with MinGW
View as plain text  
>> 	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

>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:
http://msdn2.microsoft.com/en-us/library/a90k134d.aspx, but confirmation
would be nice from someone running Visual C++ :)

Thread
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