Bug 91375 - [Qt] Fix inconsistent DLL linkage on Windows with WebKit1
Summary: [Qt] Fix inconsistent DLL linkage on Windows with WebKit1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Hausmann
URL:
Keywords:
Depends on:
Blocks: 88300
  Show dependency treegraph
 
Reported: 2012-07-16 04:47 PDT by Simon Hausmann
Modified: 2012-07-16 07:56 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2012-07-16 04:49 PDT, Simon Hausmann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 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.
Comment 1 Simon Hausmann 2012-07-16 04:49:41 PDT
Created attachment 152511 [details]
Patch
Comment 2 Laszlo Gombos 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.
Comment 3 WebKit Review Bot 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>
Comment 4 WebKit Review Bot 2012-07-16 07:56:27 PDT
All reviewed patches have been landed.  Closing bug.