http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
--- Comment #2 from PcX <xunxun1982 at gmail dot com> 2011-07-26 09:32:14 UTC --- (In reply to comment #1) > It sounds like a linker bug. Please try without fancy linker options like > --as-needed. I remove "-Wl,-O1 -Wl,--sort-common -Wl,--as-needed", and it also has the problem. ps: other linker option like "-Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import" is Code::Blocks's default option.