Linker errors with of_v0.9.8 + QtCreator 4.1

I just upgraded from of_v0.9.3 to of_v0.9.8.

I can successfully build and run the examples from the command line but when I try to build a project with QtCreator (4.1.0) I get the following linker errors:

C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSClientSession.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSClientSession.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSClientSession.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSStreamFactory.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSStreamFactory.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(HTTPSStreamFactory.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocket.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocket.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocket.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocketImpl.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocketImpl.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(SecureStreamSocketImpl.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(SecureSocketImpl.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNetSSL.a(SecureSocketImpl.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNetSSL.a(SecureSocketImpl.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(DNS.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(DNS.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(DNS.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(SocketAddress.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(SocketAddress.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(SocketAddress.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(SocketAddressImpl.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(SocketAddressImpl.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(SocketAddressImpl.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPClientSession.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPClientSession.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPClientSession.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(StreamSocket.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(StreamSocket.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(StreamSocket.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(SocketImpl.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(SocketImpl.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(SocketImpl.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPFixedLengthStream.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPFixedLengthStream.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPFixedLengthStream.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(StreamSocketImpl.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(StreamSocketImpl.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(StreamSocketImpl.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPHeaderStream.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPHeaderStream.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPHeaderStream.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPSession.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPSession.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPSession.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPStream.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPStream.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPStream.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPIOStream.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPIOStream.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPIOStream.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPStreamFactory.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPStreamFactory.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPStreamFactory.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(Socket.o): duplicate section .rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(Socket.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(Socket.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPChunkedStream.o): duplicate section.rdata$_ZTIN4Poco3Net4Impl17SocketAddressImplE[__ZTIN4Poco3Net4Impl17SocketAddressImplE]’ has different size
C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoNet.a(HTTPChunkedStream.o): duplicate section .rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]' has different size C:/of_v0.9.8/examples/gl/billboardRotationExample/../../../libs/poco/lib/msys2/libPocoNet.a(HTTPChunkedStream.o): duplicate section.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]’ has different size

C:/of_v0.9.8/examples/gl/billboardRotationExample/…/…/…/libs/poco/lib/msys2/libPocoFoundation.a(Timespan.o):Timespan.cpp:(.text+0xf0): multiple definition of `Poco::Timespan::~Timespan()’
C:/of_v0.9.8/libs/openFrameworksCompiled/lib/msys2/libopenFrameworksDebug.a(ofURLFileLoader.o):C:/msys64/mingw32/include/Poco/Timespan.h:295: first defined here
C:/of_v0.9.8/libs/openFrameworksCompiled/lib/msys2/libopenFrameworksDebug.a(ofURLFileLoader.o):ofURLFileLoader.cpp:

(.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]+0x28): undefined reference to `Poco::Net::Impl::IPv6SocketAddressImpl::toStringabi:cxx11 const’

C:/of_v0.9.8/libs/openFrameworksCompiled/lib/msys2/libopenFrameworksDebug.a(ofURLFileLoader.o):ofURLFileLoader.cpp:(.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[__ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]+0x28): undefined reference to `Poco::Net::Impl::IPv4SocketAddressImpl::toStringabi:cxx11 const’

collect2.exe: error: ld returned 1 exit status

what is going on? maybe there are different/conflicting compiler settings for the standard makefile and the qbs project?

I think there was a conflict with the static version of Poco which OF provides and the dynamic Msys2 version (which the project - I think - tries to link against). I fixed this by replacing the static version with the import libraries of the dynamic version (renaming them from .dll.a. to .a) and recompiling OF.

2 Likes

I have the same problem. Where did you find the dll.a files to change ? I did a search in poco/lib but can’t find them.

the import libraries for the dynamic version of Poco (libPoco*.dll.a) live in msys64/mingw32/lib. Just replace the libPoco*.a files in poco/lib/msys2 with the corresponding import libraries and rename them from *.dll.a to *.a (so they have the same name as the original static versions).

Great, thank you very much!