读书人

qt+mingw编译出错提示undefined ref

发布时间: 2012-01-18 00:23:26 作者: rapoo

qt+mingw编译出错,提示undefined reference to `**@**'
D:\Test\Bidding\src/soap/stdsoap2.cpp:4844: undefined reference to `setsockopt@20'
D:\Test\Bidding

\src/soap/stdsoap2.cpp:4845: undefined reference to `WSAGetLastError@0'
D:\Test\Bidding\src/soap/stdsoap2.cpp:4854:

undefined reference to `ioctlsocket@12'
D:\Test\Bidding\src/soap/stdsoap2.cpp:4856: undefined reference to

`ioctlsocket@12'
D:\Test\Bidding\src/soap/stdsoap2.cpp:4859: undefined reference to `WSAGetLastError@0'
./objs

\stdsoap2.o: In function `soap_cleanup':
D:\Test\Bidding\src/soap/stdsoap2.cpp:4923: undefined reference to

`WSACleanup@0'
./objs\stdsoap2.o: In function `soap_send_fault':
D:\Test\Bidding\src/soap/stdsoap2.cpp:15320:

undefined reference to `recv@16'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [bin\BiddingAssistant.exe]

Error 1
mingw32-make: *** [release] Error 2
The process "E:\Qt\mingw\bin\mingw32-make.exe" exited with code 2.
Error

while building project BiddingAssistant (target: Desktop)
When executing build step 'Make'

使用qt + vc是能编译通过的

,但是使用qtcreator时则提示以上问题。使用的是Qt SDK version 1.1.4

[解决办法]
Ws2_32.lib
添加这个库文件到链接

读书人网 >QT开发

热点推荐