|
From: <fab...@ti...> - 2014-04-27 12:36:45
|
Hello. I tried to use MinGW to compile a program and link it with libFLAC_static.lib, found at http://sourceforge.net/projects/flac/files/flac-win/flac-1.2.1-win/flac-1.2.1-devel-win.zip/download . Linking failed with the errors c:/[...]/flac/lib/libFLAC_static.lib(./Release_static/stream_decoder.obj):C:cygwinhomeAdm:(.text[_seek_to_absolute_sample_]+0x529): undefined reference to `_allmul' c:/[...]/flac/lib/libFLAC_static.lib(./Release_static/stream_decoder.obj):C:cygwinhomeAdm:(.text[_seek_to_absolute_sample_]+0x534): undefined reference to `_aulldiv' c:/[...]/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe: c:/[...]/flac/lib/libFLAC_static.lib(./Release_static/stream_decoder.obj): bad reloc address 0x534 in section `.text[_seek_to_absolute_sample_]' collect2.exe: error: ld returned 1 exit status After investigating a little, I found out that the cause is that libFLAC_static.lib was created with Microsoft Visual Studio, using runtime library Multi-threaded DLL (/MD switch). Some Googling reveals that more static libraries floating around have similar problems, for example MySQL. Using nm, I found out that the import library msvcrt.lib present in Microsoft Visual Studio does define _allmul and_aulldiv, while libmsvcrt.a present in MinGW does not. Maybe MinGW's libmsvcrt.a should be updated to solve this incompatibility? Regards, Fabrizio Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 [1] Links: ------ [1] http://www.istella.it?wtk=amc138614816829636 Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 |