![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
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. |
"class Query : public std: stream,public OptionalExceptions, public Lockable" becomes "class MYSQLPP_EXPORT Query : public std: stream,public OptionalExceptions, public Lockable" |
|
Repeat step 2 for the class declarations of Row (row.h:48), ResUse (result.h:61), and Fields (fields.h:41) |
|
To eliminate the warning, replace the declaration of ResUse: perator= (result.h:92) with the definition of ResUse: perator=(result.h:622) so that the function is defined within the class body of |
|
inline functions within a DLL header can lead to version conflicts... Is that a worry? |
#3
| ||||
| ||||
|
|
To eliminate the warning, replace the declaration of ResUse: perator= (result.h:92) with the definition ofResUse: perator=(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. |
perator=(const|
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. |

#4
| |||
| |||
|
|
To eliminate the warning, replace the declaration of ResUse: perator= (result.h:92) with the definition ofResUse: perator=(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: perator=(constmysqlpp::ResUse&)' defined locally after being referenced with dllimport linkage |
perator=() never is declared dllimport.|
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 Tools | |
| Display Modes | |
| |