List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:June 30 2006 12:41am
Subject:Re: Building MySQL++ 2.1.1 with MinGW
View as plain text  
Joel Fielder wrote:
> 
> 	Remove all "-DMYSQLPP_NO_DLL" switches from
> \examples\Makefile.mingw.
> 	This ensures that the preprocessor puts __declspec(dllimport) in
> place of MYSQLPP_EXPORT which allows the use of mysqlpp.dll.

Sigh....making the reverse change is exactly what _did_ work for me.  It 
was the way you're describing in earlier versions of MySQL++, and we got 
more complaints about build failures on MinGW then.  Are the MinGW 
developers flip-flopping on this issue, or fixing long-standing 
compatibility issues once and for all, or what?

I guess if they had to make it one way, I'd rather they do it the way 
you're describing, since that's the VC++ way.  But I gotta say, I'd like 
some reassurance that this isn't going to just change again someday.

It also seems that you're using tools that aren't officially released 
yet, so I wonder if I'm going to have to recommend that all MinGW users 
do the same for it to work this new way?

>  	"class Query : public std::ostream,
> 	public OptionalExceptions, public Lockable"
> 
> 	becomes
> 
> 	"class MYSQLPP_EXPORT Query : public std::ostream,
> 	public OptionalExceptions, public Lockable"

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.

Do you know if this works with VC++?  If it breaks that, I won't be 
applying it.

> 	Repeat step 2 for the class declarations of Row (row.h:48),
> ResUse (result.h:61), and Fields (fields.h:41)

No doubt "repeat for all exported classes".

> 	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.

> inline
> functions within a DLL header can lead to version conflicts...  Is that
> a worry?

If it were me designing this library from scratch, I wouldn't have made 
so many functions inline.  Personal style.  But I'm loathe to go and 
move everything out of the headers and into the .cpp files on a "maybe" 
sort of issue.
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