cisco-open-source / qtwebdriver

WebDriver implementation for Qt
https://github.com/cisco-open-source/qtwebdriver/wiki
198 stars 59 forks source link

QTWebdriver build with settings: Dynamic Library (.dll) doesn't work and integration problem of external library to QT Creator #55

Closed ReijoSep closed 7 years ago

ReijoSep commented 7 years ago

Case 1: I tried to build dynamic Library for chromium_base project: kuva Build failed.

I got many LNK2019 errors: unresolved external symbol impDispatchMessageW@4 referenced in function "private: bool __thiscall base::MessagePumpForUI::ProcessMessageHelper(struct tagMSG const &)" (?ProcessMessageHelper@MessagePumpForUI@base@@AAE_NABUtagMSG@@@Z) File: C:\Users\QTWEBDRIVER\qtwebdriver\out\message_pump_win.obj

Case 2: If I build Static library for chromium_base project. Output: chromium_base.lib build succeeded.

-> Now if I try to add static library chromium_base.lib (case 2 output) to QTCreator: application.pro:

unix|win32: LIBS += -L$$PWD/../../../../../../Users/QTWEBDRIVER/qtwebdriver/out/Default/ -lchromium_base INCLUDEPATH += $$PWD/../../../../../../Users/QTWEBDRIVER/qtwebdriver/out/Default DEPENDPATH += $$PWD/../../../../../../Users/QTWEBDRIVER/qtwebdriver/out/Default

win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../../../Users/QTWEBDRIVER/qtwebdriver/out/Default/chromium_base.lib else:unix|win32-g++: PRE_TARGETDEPS += $$PWD/../../../../../../Users/QTWEBDRIVER/qtwebdriver/out/Default/libchromium_base.a

QT Creator 4.0.2: I got same error than case 1. chromium_base.lib(message_pump_win.obj):-1: error: LNK2019: unresolved external symbol impTranslateMessage@4 referenced in function "private: bool __thiscall base::MessagePumpForUI::ProcessMessageHelper(struct tagMSG const &)" (?ProcessMessageHelper@MessagePumpForUI@base@@AAE_NABUtagMSG@@@Z)

and all other errors too.

Have you any idea, what I should do?

hekra01 commented 7 years ago

Hi

I proceed as follows: 1-Build qtwebdriver libs from source , using msvc 2013. This also builds chromium libs 2-Reference the QtWebdriver libs in Qtcreator. Example: https://github.com/cisco-open-source/qtbase/pull/2/files 3-Build/run application in QtCreator

Does this work for you?

ReijoSep commented 7 years ago

Thanks for these instructions. Example: https://github.com/cisco-open-source/qtbase/pull/2/files

and main function: wd_setup(argc, argv);

Now I got the release version for my application with QTWebDriver feature.

hekra01 commented 7 years ago

OK. So any remaining issues?

ReijoSep commented 7 years ago

No, yet. Now I try to integrate my application with QTWebdriver to Selenium environment. I will try to use Python language for application starting and UI element testing.

hekra01 commented 7 years ago

I guess we can close this?

ReijoSep commented 7 years ago

Yes, now it works OK.