我試圖編譯gsoap website中解釋的計算示例,但沒有成功。 這是我的.pro文件的外觀。在Win 7上使用gsoap和Qt 4.6編譯示例應用程序
QT += network \
xml
QT -= gui
TARGET = gsoap_c
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp \
soapcalcProxy.cpp \
stdsoap2.cpp \
soapC.cpp
HEADERS += soapcalcProxy.h \
stdsoap2.h \
soapH.h \
calc.h
OTHER_FILES += calc.nsmap
當我編譯應用程序時,我得到93個未定義的引用。以下是其中的幾個:
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:593: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:595: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:629: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:933: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:936: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:941: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3557: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3615: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3647: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3728: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3760: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:3902: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4310: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4400: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4397: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4531: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4542: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4608: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4699: undefined reference to `[email protected]'
C:\Users\Drena\Desktop\project\qt\gsoap_c/stdsoap2.cpp:4956: undefined reference to `[email protected]'
看來我缺少一些網絡庫。有人可以幫我編譯這個例子。
謝謝。
我認爲這取決於工具鏈,對於MSVC是的 - 但不適用於mingw – paulm 2013-03-12 20:53:37
我剛剛使用了Qt 5.0.1 SDK中的mingw。 – 2013-03-12 21:07:30