Hi,
I have successfully created a little wxWidgets dialogue application with CodeLite. I would like to create my release executable with the DLL's "Baked In" - I think this is called a static executable?
Would anyone be able to help me with the Project Settings in order to do this? Will I also need to recompile wxWidgets?
I have successfully created a separate build using the configuration manager which is simply a clone of the standard release build...but that is as far as I've got.
Thank you in advance for your help.
My setup is as follows:
CodeLite 11.0.1
wxWidgets-3.0.3 - compiled by following the instructions here: http://codelite.org/Developers/BuildingWxWidgetsWin (at the time, TDM-GCC-64 was the linked version of gcc)
TDM-GCC-64
Kind Regards
Rob
How create an Executable with the DLL's Baked In
-
- CodeLite Curious
- Posts: 4
- Joined: Thu Nov 09, 2017 4:56 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Curious
- Posts: 4
- Joined: Thu Nov 09, 2017 4:56 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How create an Executable with the DLL's Baked In
Hi again
I think I have figured this out but would appreciated opinions on whether this is the "correct" method i.e. if there's a better way of doing this.
1) Compile wxWidgets again according to http://codelite.org/Developers/BuildingWxWidgetsWin but this time, instead of the option SHARED=1 use SHARED=0 and also omit -fno-keep-inline-dllexport (I did this primarily because the option has dll in it - I'm not sure whether this is neccesary/correct)
2) Alter the system WXCFG variable to be 'gcc_lib/mswu' - previously it was 'gcc_dll/mswu'
3) Add '-static -static-libgcc -static-libstdc++' to the CXX and C Flags
4) Make sure codelite has C:\wxWidgets-3.0.3\lib\gcc_lib in the path (removing C:\wxWidgets-3.0.3\lib\gcc_dll)
This seems to do the trick. However, it works with the TDM GCC 64 as opposed to the version linked from point (1) as the point (1) version is missing a few of the statically compiled c++ libraries.
Thanks for any comments.
Regards
Rob
I think I have figured this out but would appreciated opinions on whether this is the "correct" method i.e. if there's a better way of doing this.
1) Compile wxWidgets again according to http://codelite.org/Developers/BuildingWxWidgetsWin but this time, instead of the option SHARED=1 use SHARED=0 and also omit -fno-keep-inline-dllexport (I did this primarily because the option has dll in it - I'm not sure whether this is neccesary/correct)
2) Alter the system WXCFG variable to be 'gcc_lib/mswu' - previously it was 'gcc_dll/mswu'
3) Add '-static -static-libgcc -static-libstdc++' to the CXX and C Flags
4) Make sure codelite has C:\wxWidgets-3.0.3\lib\gcc_lib in the path (removing C:\wxWidgets-3.0.3\lib\gcc_dll)
This seems to do the trick. However, it works with the TDM GCC 64 as opposed to the version linked from point (1) as the point (1) version is missing a few of the statically compiled c++ libraries.
Thanks for any comments.
Regards
Rob