Summary: | cross-i686-pc-mingw32/gcc-4.5.3-r2 g++ can't link programs with STL | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | M8R-u38wij |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | slyfox |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 627914 | ||
Attachments: |
i686-pc-mingw32-logs.tar.bz2
emerge-info helloworld.cpp link.log |
Description
M8R-u38wij
2012-05-09 11:05:24 UTC
Created attachment 311227 [details]
i686-pc-mingw32-logs.tar.bz2
Created attachment 311229 [details]
emerge-info
Created attachment 311231 [details]
helloworld.cpp
works fine for me # qlist -Iv cross-i686-pc-mingw32 cross-i686-pc-mingw32/binutils-2.22-r1 cross-i686-pc-mingw32/gcc-4.5.3-r2 cross-i686-pc-mingw32/mingw-runtime-3.18 cross-i686-pc-mingw32/w32api-3.17.2 # i686-pc-mingw32-g++ -c helloworld.cpp # i686-pc-mingw32-g++ helloworld.o # file a.exe a.exe: PE32 executable (console) Intel 80386, for MS Windows try running the command: # i686-pc-mingw32-g++ helloworld.o -v -Wl,--verbose |& grep stdc /usr/libexec/gcc/i686-pc-mingw32/4.5.3/collect2 --sysroot=/usr/i686-pc-mingw32 -Bdynamic /usr/i686-pc-mingw32/mingw/lib/crt2.o /usr/lib/gcc/i686-pc-mingw32/4.5.3/crtbegin.o -L/usr/lib/gcc/i686-pc-mingw32/4.5.3 -L/usr/i686-pc-mingw32/mingw/lib helloworld.o --verbose -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt /usr/lib/gcc/i686-pc-mingw32/4.5.3/crtend.o attempt to open /usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a succeeded (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d002780.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d002781.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d002858.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d000982.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d002516.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d002514.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d000000.o (/usr/lib/gcc/i686-pc-mingw32/4.5.3/libstdc++.dll.a)d003506.o Created attachment 311457 [details]
link.log
full output of
# i686-pc-mingw32-g++ helloworld.o -v -Wl,--verbose
(In reply to comment #4) Works correctly on my x86 PC and produces error on amd64 laptop. On which architecture you run it? my amd64 desktop Works fine after upgrade to gcc-4.6.3 I had such problems when I had two migw32-g++ installed: 4.5 (active) and 4.7. For some reason 4.5 had empty libstdc++. 4.6.3 seems to produce binaries, but they are broken. Even simple <iostream>y "hello world" produced by 4.6.3 dies before main() (somewhere in sjlj.dll loader). Binaried built winh 4.7.1 look and run fine. |