On Windows, using VS 2017, how do I switch between static and dynamic linking of my app?
Thanks!
Vaclav
How to switch between static and dynamic link? Topic is solved
Re: How to switch between static and dynamic link?
It depends on which configuration you are switching from/to.
The basic differences are just two:
The basic differences are just two:
- If you are using the dynamic build, WXUSINGDLL must be defined in your application project in C/C++ / Preprocessor / Preprocessor Definitions.
- The dynamic libraries are in $(WXWIN)/lib/vc_dll while the static ones are in $(WXWIN)/lib/vc_lib. You need to change the directories accordingly in Linker / General / Additional Library Directories. If you do not use MSVC autolinking (via including $(WXWIN)\include\msvc) you also need to changer the configuration specific include folder listed as the first in C/C++ / General / Additional Include Directories, which would be e.g. $(WXWIN)\lib\vc_dll\mswud for the dynamic debug build.
Re: How to switch between static and dynamic link?
ok, so the samples provided with wxWidgets are pre-configured for static build right?
(the hey the vc.lib in Linker/General/Additional...)
(the hey the vc.lib in Linker/General/Additional...)
Re: How to switch between static and dynamic link?
wxWidgets MSVC solutions contain multiple configurations. Configurations named Debug and Release are static; configurations named DLL Debug and DLL Release use DLLs.
Re: How to switch between static and dynamic link?
Hi,
By default MSVC solution files will build statically linked wxWidgets libraries and produces statically linked samples.
However you can change it for the samples, if you did build the library as DLL Debug/Release.
Thank you.
By default MSVC solution files will build statically linked wxWidgets libraries and produces statically linked samples.
However you can change it for the samples, if you did build the library as DLL Debug/Release.
Thank you.
Re: How to switch between static and dynamic link?
Thank you
Vaclav
Vaclav