Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Separate lib files.
(1/1)
Zachary1234:
I am running Windows 10 64 bit Home Edition.
I am relying on the TDM 64 bit c++ compiler.
I am using Code::Blocks.
I want to use Code::Blocks to compile and build
my project's executable file without including
things like
libstdc++-6.dll
that are #include -ed into the executable, but
that I want to remain outside the executable,
to be relied on separately. How do I acomplish this?
Miguel Gimenez:
From the TDM page at http://tdm-gcc.tdragon.net/quirks
--- Quote ---Static runtime linkage (libgcc & friends)
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.
--- End quote ---
In the project options you have -static-libgcc and -static-libstdc++. If unchecking them is not enough, you should add -shared-libgcc and -shared-libstdc++ to Other compiler options.
Zachary1234:
-I am not refering to that particular lib, or dll. What options do I use to keep
any of my includes outside of the compiled exectuable? I am still using the TDM
compiler.
?
Miguel Gimenez:
That particular dll is managed the way I told you. For the others, you must link your program with static libraries if you don't want dlls and with shared libraries if you do want dlls.
When you compile or download a library you decide if it will be shared or static (you can build both, of course).
Navigation
[0] Message Index
Go to full version