#170 Build Error STLport 5.1.2 with MinGW 4.2.3 TDM

5.1
closed-rejected
nobody
5
2008-03-18
2008-03-17
Vilan Hosta
No

Cannot build dbg-shared and stldbg-shared versions of the library with mingw 4.2.3 TDM (MSYS).

During linking phase the compiler says the following:
/STLport-5.1.5/STLport-5.1.5/build/lib/../../src/complex_trig.cpp:(.text$sinhf[_sinhf]+0x0): first defined here
f:/bin/dev/mingw/bin/../lib/gcc/mingw32/4.2.3/../../../libstdc++.a(stubs.o):stubs.c:(.text+0x4a0): multiple definition of `expf'
obj/gcc/so_g/complex.o:F:/bin/dev/1.0/home/ROOT/STLport-5.1.5/STLport-5.1.5/build/lib/../../src/complex.cpp:(.text$expf[_expf]+0x0): first defined here
f:/bin/dev/mingw/bin/../lib/gcc/mingw32/4.2.3/../../../libstdc++.a(stubs.o):stubs.c:(.text+0x4e0): multiple definition of `coshf'
obj/gcc/so_g/complex_trig.o:F:/bin/dev/1.0/home/ROOT/STLport-5.1.5/STLport-5.1.5/build/lib/../../src/complex_trig.cpp:(.text$coshf[_coshf]+0x0): first defined here

I've soveld this problem by changing the following lines in the build\Makefiles\gmake\gcc.mak file:
"dbg-shared : OPT += -g -fno-inline" to "dbg-shared : OPT += -g -finline" and
"stldbg-shared : OPT += -g -fno-inline" to "stldbg-shared : OPT += -g -finline"

Then it links silently but I don't know is this correct to switch off -fno-inline option in the debug version.

Discussion

    • status: open --> closed-rejected