The static build has one advantage: You do not need to ship any DLLs with your executable at all. Actually, it has two advantages: As only the used library code is linked in, the resulting size of your application installation is usually smaller then when shipping executable + DLLs.
To have a true static build, one has to build wxWidgets statically (SHARED=0) but also link compiler libraries statically, e.g., when building wxWidgets using LDFLAGS="-static" parameter for make and also using this parameter when building your application.
wxWidgets and codelite build problem
Re: wxWidgets and codelite build problem
No, always append $(PATH) (or prepend it).
Just do it on the workspace or project level rather than on the global IDE level
Just do it on the workspace or project level rather than on the global IDE level
Re: wxWidgets and codelite build problem
Hi,
Dynamic build make sense in case you will produce the DLL/so/dylib as part of your software.
Thank you.
If you intend to have only one executable - it is better to have a static build.
Dynamic build make sense in case you will produce the DLL/so/dylib as part of your software.
Thank you.
Re: wxWidgets and codelite build problem
Hi, PB,
In fact it is better not to do it and keep the Windows libraries dynamic.
Thank you.
You can't always have a fully static build, as Windows CRT can't always be legally linked statically.PB wrote: ↑Mon Feb 08, 2021 7:50 pm The static build has one advantage: You do not need to ship any DLLs with your executable at all. Actually, it has two advantages: As only the used library code is linked in, the resulting size of your application installation is usually smaller then when shipping executable + DLLs.
To have a true static build, one has to build wxWidgets statically (SHARED=0) but also link compiler libraries statically, e.g., when building wxWidgets using LDFLAGS="-static" parameter for make and also using this parameter when building your application.
In fact it is better not to do it and keep the Windows libraries dynamic.
Thank you.
Re: wxWidgets and codelite build problem
I was not talking about Windows libraries, those are always available on a Windows computer. I meant not requiring any wxWidgets (e.g., wxbase314u_gcc_custom.dll and wxmsw314u_core_gcc_custom.dll) nor GCC (e.g., libgcc_s_dw2-1.dll, libstdc++-6.dll, or libwinpthread-1.dll) runtime linked libraries.
Re: wxWidgets and codelite build problem
PB,
OK, I will shut up now, as I'm not familiar with MinGW, and therefore have no idea about compiler specific libraries.
Thank you.
OK, I will shut up now, as I'm not familiar with MinGW, and therefore have no idea about compiler specific libraries.
Thank you.
Re: wxWidgets and codelite build problem
Static link of GCC runtime library normally requires the product if released to the public to be open source and LGPL or GPL licensed.
Tim S.
Tim S.
Re: wxWidgets and codelite build problem
Could you please tell me what source is this information based on? I am certainly no expert but based on http://www.gnu.org/licenses/gcc-exception-3.1.html and the below from http://www.gnu.org/licenses/gcc-exception-3.1-faq.html
it may appear that the way the GCC runtime libraries are linked has no effect on license which the application can use? Am I wrong?... neither the GPL nor the GCC Runtime Library Exception distinguish between static linking, dynamic linking, and other methods for combining code in their conditions. The same permissions are available to you, under the same terms, no matter which method you use.
....
The GCC Runtime Library Exception covers any file that has a notice in its license headers stating that the exception applies. This includes libgcc, libstdc++, libfortran, libgomp, libdecnumber, libgcov, and other libraries distributed with GCC.
Re: wxWidgets and codelite build problem
PB: You appear to be right; but, I remember being told otherwise in the past.
All that I have found is parts require the copyright notice (like most BSD lic. code) does to be included.
Tim S.
All that I have found is parts require the copyright notice (like most BSD lic. code) does to be included.
Tim S.