You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GCC build passes -static-libstdc++, which is not a valid option in TDM-GCC (http://stackoverflow.com/a/19080526). Apparently static linking is the default anyway.
This is probably more TDM-GCC doing something wrong, since this probably shouldn't be reported as an error (aborting compilation).
Possible workarounds in the build script include checking the GCC version or retrying without that option on error. Neither option is particularly nice.
I leave this issue here in case someone else stumbles on the same problem.
The text was updated successfully, but these errors were encountered:
As far as I know, GCC uses the shared version of libstdc++, if it's available:
When the g++ program is used to link a C++ program, it normally automatically links against libstdc++. If libstdc++ is available as a shared library, and the -static option is not used, then this links against the shared version of libstdc++. Source.
That's why I've specified it explicitly. However, I could probably just reduce it to -static.
TDM-GCC is, ah... different from vanilla GCC. From their quirks page:
TDM-GCC doesn't link your programs with the libgcc or libstdc++ runtime DLLs by default.
Other toolchains default to DLL runtime linkage in order to allow you to throw exceptions among DLLs and EXEs.
TDM-GCC lets you throw exceptions among DLLs and EXEs even with the static runtime.
Your programs will not rely on any additional DLLs when compiling with default options.
TDM-GCC still includes DLL versions of the libgcc and libstdc++ runtimes, which you can enable for your program with "-shared-libgcc" and "-shared-libstdc++" if desired.
As quoted earlier, the -static-libstdc++ option was only added in 4.8.1.
TDM-GCC is fairly popular as a Win32 port of GCC (the other major one being MingW, which TDM-GCC is based on). It's also the default for Code::Blocks. So, not exactly obscure, but considering they've fixed it in the latest version it matters even less now.
I see. But still, replacing -static-libgcc -static-libstdc++ with -static probably wouldn't hurt anybody, while adding out-of-the-box compatibility with older versions of TDM-GCC.
The GCC build passes
-static-libstdc++
, which is not a valid option in TDM-GCC (http://stackoverflow.com/a/19080526). Apparently static linking is the default anyway.This is probably more TDM-GCC doing something wrong, since this probably shouldn't be reported as an error (aborting compilation).
Possible workarounds in the build script include checking the GCC version or retrying without that option on error. Neither option is particularly nice.
I leave this issue here in case someone else stumbles on the same problem.
The text was updated successfully, but these errors were encountered: