I have developed a program, which compiles and runs fine on linux, but now I am trying to link the program on windows and have two groups of errors.
The programm depends on the following librarys. Xerces-c++ and boost::file_system, which itself requires boost::system.
I use qmake as file system and the libs are linked with the following lines (autogenerated by qtcreator):
win32: LIBS += -L$$PWD/../local/boost_1_54_032bit/lib32-msvc-11.0/ -llibboost_filesystem-vc110-gd-1_54
INCLUDEPATH += $$PWD/../local/boost_1_54_032bit/libs
DEPENDPATH += $$PWD/../local/boost_1_54_032bit/libs
win32: LIBS += -L$$PWD/../xerces-c-3.1.4/xerces-c-3.1.4/src/.libs/ -lxerces-c
INCLUDEPATH += $$PWD/../xerces-c-3.1.4/xerces-c-3.1.4/src
DEPENDPATH += $$PWD/../xerces-c-3.1.4/xerces-c-3.1.4/src
win32: LIBS += -lboost_system-vc110-gd-1_54
I compiled Xerces-c++ with mingw 5.3.0-2 and ./configure LDFLAGS=-no-undefined
When I link against xerces-c++ I get the following errors:
C:\xerces-c-3.1.4\xerces-c-3.1.4\src\.libs\libxerces-c.a(DOMLSOutputImpl.o):-1: Fehler: duplicate section `.rdata$_ZTVN11xercesc_3_113XMLAttDefListE[__ZTVN11xercesc_3_113XMLAttDefListE]' has different size
After reading similar questions on so (Regex Boost library linking in release mode warns "duplicate section has different size" when using mingw-w64 toolchain), I tried compiling the library and the program with the compiler flags -Os -march=i686 -fno-tree-vectorize without any improvements.
The second group of errors relates to the boost library. I am linking against a precompiled binary of boost::system and boost::filesystem, but when I try to link the program, I get the errors:
C:\local\boost_1_54_0\boost\system\error_code.hpp:222: Error: undefined reference to `boost::system::generic_category()'
Thank you in advance for your help!