Build for Visual Studio 2019
Re: Build for Visual Studio 2019
Use static linking. I can only think of very few reasons for using DLLs anyway.
Use the source, Luke!
Re: Build for Visual Studio 2019
You will still have to distribute all the DLLs to the users along the executable but for development, you can add the folder with wxWidgets DLLs to your project.
In MSVC go to project properties / Configuration Properties / Debugging and in the Environment field add the folder. E.g, for DLL Debug it would be (assuming you have system environment WXWIN set properly):
Code: Select all
PATH=$(WXWIN)\lib\vc_dll
Re: Build for Visual Studio 2019
Thanks, that environment path technique worked. I won't distribute the program with DLLs,right.
I thought dynamic linking will take less amount of compile and build time? So, I can build, run and test quickly?
My another little doubt: is WIN32 a right macro? Shouldn't it be _WIN32? There's no WIN32 macro in MSDN documentation. Is it special to wxWidgets?
I thought dynamic linking will take less amount of compile and build time? So, I can build, run and test quickly?
My another little doubt: is WIN32 a right macro? Shouldn't it be _WIN32? There's no WIN32 macro in MSDN documentation. Is it special to wxWidgets?
Re: Build for Visual Studio 2019
I never timed it but I think time taken by statically linking a library such as wxWidgets would be negligible.
I think _WIN32 is defined by the MSVC itself when targeting the platform, similarly to _LIB and _DEBUG when using the static debug version of the CRT, see here.
I believe that for the debug configuration, the only required MSW-specific project defines are __WXMSW__, _UNICODE, and UNICODE. I myself add also NDEBUG to the release one...
Re: Build for Visual Studio 2019
Note that I mean WIN32 not _WIN32. What is WIN32 for? I found this in minimal build
Re: Build for Visual Studio 2019
As I said, I believe WIN32 is not needed. wxWidgets defines this macro itself in platform.h:
Code: Select all
#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__)
# ifndef __WINDOWS__
# define __WINDOWS__
# endif /* !__WINDOWS__ */
#endif /* Any standard symbol indicating Windows */
#if defined(__WINDOWS__)
/* Select wxMSW under Windows if no other port is specified. */
# if !defined(__WXMSW__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXQT__)
# define __WXMSW__
# endif
# ifndef _WIN32
# define _WIN32
# endif
# ifndef WIN32
# define WIN32
# endif