2013-02-11 76 views
2

我试图在Windows 7上使用capybara-webkit,并遇到问题。我试图按照说明here,但我有问题。具体来说,我有从源代码构建的问题。以下是建筑物非常大输出的一小部分。在Windows 7上构建capybara-webkit

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

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 

有谁知道我在做什么错误,以及如何正确编译水豚,WebKit的?

回答

2

我实际上通过获取正确版本的QT来解决这个问题。我原先下载了Visual Studios 2008版本,但在更改为MingGW版本后,所有内容均按预期工作。

相关问题