当前位置: 代码迷 >> QT开发 >> qt+mingw编译出错,提示undefined reference to `@*'解决思路
  详细解决方案

qt+mingw编译出错,提示undefined reference to `@*'解决思路

热度:369   发布时间:2016-04-25 05:12:23.0
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
添加这个库文件到链接
  相关解决方案