windows-7 - 在 Windows 7 上构建 capybara-webkit

标签 windows-7 capybara-webkit

我尝试在 Windows 7 上使用 capybara-webkit 但遇到问题。我正在尝试按照说明 here 进行操作但我遇到了问题。具体来说,我在从源代码构建时遇到问题。以下是构建过程中大量输出的一小部分摘录。

第一个输出来自错误发生的位置。

g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -D QT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I'c:/Qt/4.8.4/include/QtCore' -I'c:/Qt/4.8.4/include/QtNetwork' -I'c:/Qt/4.8.4/include/QtGui' -I'c:/Qt/4.8.4/include/QtWebKit' -I'c:/Qt/4.8.4/include' -I'c:/Qt/4.8.4/include/ActiveQt' -I'debug' -I'c:/Qt/4.8.4/mkspecs/win32-g++' -o debug/qrc_webkit_server.o debug/qrc_webkit_server.cpp
g++ -Wl,-subsystem,console -mthreads -o debug/webkit_server.exe object_script.webkit_server.Debug  -L'c:/Qt/4.8.4/lib' -lQtWebKitd4 -lQtGuid4 -lQtNetworkd4 -lQtCored4
./debug/Version.o: In function `ZN7Version5startEv':
c:\MyRailsProject\capybara-webkit\src/Version.cpp:11: undefined reference to `_imp___Z14qWebKitVersionv'
./debug/Version.o: In function `ZN7QStringpLERKS_':
c:/Qt/4.8.4/include/QtCore/../../src/corelib/tools/qstring.h:274: undefined reference to `_imp___ZN7QString6appendERKS_'
./debug/Version.o: In function `QString':
c:/Qt/4.8.4/include/QtCore/../../src/corelib/tools/qstring.h:419: undefined reference to `_imp___ZN7QString16fromAscii_helperEPKci'

这是来自很长的输出链的最末端

collect2: ld returned 1 exit status
make[2]: *** [debug/webkit_server.exe] Error 1
make[2]: Leaving directory `/c/MyRailsProject/capybara-webkit/src'
make[1]: *** [debug] Error 2
make[1]: Leaving directory `/c/MyRailsProject/capybara-webkit/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
Command 'make' failed

有人知道我做错了什么以及如何正确编译 capybara-webkit 吗?

最佳答案

我实际上通过获取正确的 QT 版本解决了这个问题。我最初下载的是 Visual Studios 2008 版本,但更改为 MingGW 版本后一切正常。

关于windows-7 - 在 Windows 7 上构建 capybara-webkit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14804141/

相关文章:

c++ - Windows 7 库

c# - 以编程方式更改 Windows 7 的 Windows 颜色边框

c# - 如何将 'Pin this program to the taskbar' 添加到 Windows 7 的跳转列表中?

ruby - 从 Ruby 中的 Capybara 运行时,webkit_server 会定期挂起

cucumber - 在 cucumber 中使用相同的浏览器窗口

c++ - 防止在 Windows 中取消停靠计算机

android - 从 Windows 读取 android 短信中的消息

ruby-on-rails-3 - rails 3.1,capybara-webkit,为什么 page.execute_script 失败?

ruby-on-rails - 无法在 Rails 4 中使用 bundle install 命令安装 capybara-webkit

ruby-on-rails - 使用 Capybara 检查隐藏的复选框