vendredi 3 avril 2015

Error building OpenCV static libraries in Windows 8 with TDM-GCC-64, Cmake, and CodeBlocks

I am trying to build static libraries with the hopes of creating a portable executable. I was successful at building dynamic libraries using the following tutorial:


http://ift.tt/19N7uiT


I am essentially repeating the process, but with BUILD_SHARED_LIBS = OFF.


I build in CodeBlocks and it fails. The Build messages I get are a series of variations of the following (varying in d00xxxxxx):


C:\TDM-GCC-64\bin..\lib\gcc\x86_64-w64-mingw32\4.9.2\libstdc++.dll.a(d002386.o)|| first defined here|


The Build log shows:


C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2\libstdc++.a(sstream-inst.o):sstream-inst.cc:(.text$_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev[_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev]+0x0): multiple definition of std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/libstdc++.dll.a(d002386.o):(.text+0x0): first defined here C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2\libstdc++.a(sstream-inst.o):sstream-inst.cc:(.text$_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv[_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv]+0x0): multiple definition ofstd::basic_stringbuf, std::allocator >::str() const' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/libstdc++.dll.a(d000413.o):(.text+0x0): first defined here


Both of these repeat for the maximum allowed 50 errors.


Any help would be greatly appreciated.


Aucun commentaire:

Enregistrer un commentaire