Trying to build amarokplasmalib in MSVC
Michael O'Shea
michael.a.oshea at gmail.com
Thu Feb 14 23:35:07 CET 2008
People,
you may have seen me on IRC discussing the building of amarokplasmalib in
MSVC. I don't actually want to obtain anything that can execute, I just want
to use MSVC's call mapping tools to analyse the dependencies between
different libraries. This requires that I be able to finish building objects
properly.
I'm having trouble at compile time where I get "warning C4273: [some method
call] : inconsistent dll linkage".
I've done some investigation into the issue but I've run into a wall and I'm
appealing to anyone who is experienced this particular area.
In short : has anybody tried/managed to build parts of/complete apps in MSVC
? If so, would they agree to share some helpful tips to help me do the same
?
I know that this is about the call model that these methods are defined with
( __declspec(dllimport), __declspec(dllexport) ) and that what is needed is
to set the appropriate compiler flags in order to get all the necessary
#defines made by the preprocessor.
My investigations (and a tip from Saro) have led me to specify the following
list of compile definitions :
MAKE_AMAROKPLASMA_LIB;
WIN32;
_WIN32;
_WINDOWS;
_CRT_NONSTDC_NO_DEPRECATE;
_SCL_SECURE_NO_WARNINGS;
QT3_SUPPORT;
QT3_SUPPORT_WARNINGS;
QT_DLL;
KDE_FULL_TEMPLATE_EXPORT_INSTANTIATION;
WIN32_LEAN_AND_MEAN;
UNICODE;
QT_NO_STL;
QT_NO_CAST_TO_ASCII;
_REENTRANT;
KDE_DEPRECATED_WARNINGS;
QT_STL
I'm still getting the errors.
I've tracked back a few of the #defines (#define KDE_EXPORT in kdemacros.h)
to where they are defined but they in turn depend on the values of yet more
#defines. It quickly gets very complicated and I've gotten stuck (like :
what *should* the correct value for PLASMA_EXPORT *be* ?).
Before I get carried away and dive into some really extreme troubleshooting
(eample : scatter something like *#pragma message ("_WIN32 is defined, going
to define KDE_EXPORT and KDE_IMPORT in kdemacros.h")* everywhere in the
code, I'm especially wary of #undefs* *), does someone out there have some
information that would save me a massive amount of effort ?
Thanks in advance for any suggestions.
Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-windows/attachments/20080214/36ccdd09/attachment.html
More information about the Kde-windows
mailing list