0

I have followed the directions at https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit for installation on Windows 7. I have uninstalled Qt and reinstalled and tried to do this many times, and I can't get it to work.

I added to qmake.conf the line

QMAKE_LFLAGS = -static-libgcc -static-libstdc++

The other line in the directions for QMAKE_RCC was already there.

When I do this command in the directions...

C:\development\Ruby193\capybara-webkit>bundle exec rake build

I get errors - starting with:

c:/Qt/qt-4.8.5-x64-mingw/bin/qmake.exe -spec ../../../Qt/qt-4.8.5-x64-mingw/mksp WARNING: (internal):1: Unescaped backslashes are deprecated. cd src/ && c:/Qt/qt-4.8.5-x64-mingw/bin/qmake.exe c:/development/Ruby193/capybar /mkspecs/win32-g++ CONFIG+\=test -o Makefile.webkit_server WARNING: (internal):1: Unescaped backslashes are deprecated. cd src/ && make -f Makefile.webkit_server make[1]: Entering directory /c/development/Ruby193/capybara-webkit/src' make -f Makefile.webkit_server.Debug make[2]: Entering directory/c/development/Ruby193/capybara-webkit/src' g++ -static-libgcc -static-libstdc++ -Wl,-subsystem,console -mthreads -o debug/w x64-mingw/lib' -lQtWebKitd4 -lQtGuid4 -lQtNetworkd4 -lQtCored4 g++.exe: unrecognized option '-static-libstdc++' ./build/BlockUrl.o: In function ZNK5QListI7QStringEixEi': c:\development\Ruby193\capybara-webkit\src/../../../../Qt/qt-4.8.5-x64-mingw/inc PKcS0_S0_i' ./build/SetUnknownUrlMode.o: In functionZN7QStringpLERKS_': c:\development\Ruby193\capybara-webkit\src/../../../../Qt/qt-4.8.5-x64-mingw/inc ppendERKS_'

...

ending with the following lines:

./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x20): undefined reference to QObject::ev entFilter(QObject*, QEvent*)' ./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x24): undefined reference toQObject::ti merEvent(QTimerEvent*)' ./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x28): undefined reference to QObject::ch ildEvent(QChildEvent*)' ./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x2c): undefined reference toQObject::cu stomEvent(QEvent*)' ./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x30): undefined reference to QObject::co nnectNotify(char const*)' ./build/moc_RequestHandler.o:moc_RequestHandler.cpp:(.rdata$_ZTV14RequestHandler[vtable for RequestHandler]+0x34): undefined reference toQObject::di sconnectNotify(char const*)' ./build/moc_RequestHandler.o: In function ~RequestHandler': c:\development\Ruby193\capybara-webkit\src/build/../RequestHandler.h:11: undefined reference to_imp___ZN7QObjectD2Ev' ./build/qrc_webkit_server.o: In function Z28qInitResources_webkit_serverv': c:\development\Ruby193\capybara-webkit\src/debug/qrc_webkit_server.cpp:479: undefined reference to_imp___Z21qRegisterResourceDataiPKhS0_S0_' ./build/qrc_webkit_server.o: In function Z31qCleanupResources_webkit_serverv': c:\development\Ruby193\capybara-webkit\src/debug/qrc_webkit_server.cpp:488: undefined reference to_imp___Z23qUnregisterResourceDataiPKhS0_S0_' collect2: ld returned 1 exit status make[2]: * [debug/webkit_server.exe] Error 1 make[2]: Leaving directory /c/development/Ruby193/capybara-webkit/src' make[1]: *** [debug] Error 2 make[1]: Leaving directory/c/development/Ruby193/capybara-webkit/src' make: * [sub-src-webkit_server-pro-make_default-ordered] Error 2 Command 'make' failed

  • It looks like the issue is the added flag which was part of the instructions for doing this build. – Charlene Wroblewski Mar 02 '15 at 14:59
  • It looks like the issue is the added flag which was part of the instructions for doing this build ----- unrecognized option '-static-libstdc++' I've been doing some searching on this option, but I haven't figured out the solution for the problem. Removing the switch does not work and doesn't seem to alter the error message, except the line complaining about the unrecognized option goes away. – Charlene Wroblewski Mar 02 '15 at 15:06
  • Any luck on this ? I am facing the same problem – heaven00 Nov 29 '15 at 22:04

0 Answers0