Bug 91375

Summary: [Qt] Fix inconsistent DLL linkage on Windows with WebKit1
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: PlatformAssignee: Simon Hausmann <hausmann>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 88300    
Attachments:
Description Flags
Patch none

Simon Hausmann
Reported 2012-07-16 04:47:17 PDT
Linking on Windows fails: link /LIBPATH:"c:\dev\qt5\qtbase\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /MANIFEST /MANIFESTFILE:"obj/release\QtWebKit.intermediate.manifest" /VERSION:5.00 /OUT:..\lib\QtWebKit5.dll @C:\Users\SIMONH~1\AppData\Local\Temp\nmE740.tmp Creating library ..\lib\QtWebKit5.lib and object ..\lib\QtWebKit5.exp WebKit1.lib(DumpRenderTreeSupportQt.obj) : warning LNK4217: locally defined symbol ?core@QWebHistoryItemPrivate@@SAPAVHistoryItem@WebCore@@PBVQWebHistoryItem@@@Z (public: static class WebCore::HistoryItem * __cdecl QWebHistoryItemPrivate::core(class QWebHistoryItem const *)) imported in function "public: static bool __cdecl DumpRenderTreeSupportQt::isTargetItem(class QWebHistoryItem const &)" (?isTargetItem@DumpRenderTreeSupportQt@@SA_NABVQWebHistoryItem@@@Z) WebKit1.lib(DumpRenderTreeSupportQt.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebHistoryItemPrivate::QWebHistoryItemPrivate(class WebCore::HistoryItem *)" (__imp_??0QWebHistoryItemPrivate@@QAE@PAVHistoryItem@WebCore@@@Z) referenced in function "public: static class QMap<class QString,class QWebHistoryItem> __cdecl DumpRenderTreeSupportQt::getChildHistoryItems(class QWebHistoryItem const &)" (?getChildHistoryItems@DumpRenderTreeSupportQt@@SA?AV?$QMap@VQString@@VQWebHistoryItem@@@@ABVQWebHistoryItem@@@Z) WebKit1.lib(qwebhistory.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebHistoryItemPrivate::QWebHistoryItemPrivate(class WebCore::HistoryItem *)" (__imp_??0QWebHistoryItemPrivate@@QAE@PAVHistoryItem@WebCore@@@Z) WebKit1.lib(FrameLoaderClientQt.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebHistoryItemPrivate::QWebHistoryItemPrivate(class WebCore::HistoryItem *)" (__imp_??0QWebHistoryItemPrivate@@QAE@PAVHistoryItem@WebCore@@@Z) WebKit1.lib(qwebhistory.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebHistoryItemPrivate::~QWebHistoryItemPrivate(void)" (__imp_??1QWebHistoryItemPrivate@@QAE@XZ) referenced in function "public: void * __thiscall QWebHistoryItemPrivate::`scalar deleting destructor'(unsigned int)" (??_GQWebHistoryItemPrivate@@QAEPAXI@Z) ..\lib\QtWebKit5.dll : fatal error LNK1120: 2 unresolved externals QWebHistoryItemPrivate is marked with Q_AUTOTEST_EXPORT. However that macro only works for libraries inside of Qt - we choose not to define things like QT_BUILDING_QT and QT_BUILD_INTERNAL. We could introduce our own Q_AUTOTEST_EXPORT macro or we could simply export this one class that exists only in a private header file only. I'm going to take the latter approach.
Attachments
Patch (1.45 KB, patch)
2012-07-16 04:49 PDT, Simon Hausmann
no flags
Simon Hausmann
Comment 1 2012-07-16 04:49:41 PDT
Laszlo Gombos
Comment 2 2012-07-16 06:28:44 PDT
Comment on attachment 152511 [details] Patch Looks good to me. I assume this was the only place where we had Q_AUTOTEST_EXPORT.
WebKit Review Bot
Comment 3 2012-07-16 07:56:23 PDT
Comment on attachment 152511 [details] Patch Clearing flags on attachment: 152511 Committed r122727: <http://trac.webkit.org/changeset/122727>
WebKit Review Bot
Comment 4 2012-07-16 07:56:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.