From 523979b1f1ec3db2e8dc5d0605de960ed2ab48db Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Nov 2023 02:25:32 +0100 Subject: [PATCH] Explain that using MSVC-specific wx/setup.h is optional It made sense to emphasize its use when this was the recommended way to set up MSVS projects, but now the simplest (and hence recommended) way to do it is using wxwidgets.props file, so make the manual setup instructions more generic as they're most likely to be used with non-MSVC compilers. --- docs/msw/install.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/msw/install.md b/docs/msw/install.md index d95f8e6d6a..38f0b7c813 100644 --- a/docs/msw/install.md +++ b/docs/msw/install.md @@ -455,18 +455,22 @@ Here is what you need to do: - compiler - resource compiler include paths. -* If using MSVC, prepend `$WXWIN\include\msvc` to the include paths too. - Otherwise, append `\mswu[d]` to the include paths, where "d" should +* Append `\mswu[d]` to the include paths, where "d" should be used for debug builds only. + When using MSVC, there is a simpler alternative which allows to use the + same compiler options for debug and release builds: just prepend + `$WXWIN\include\msvc` to the include paths **instead** of the paths above. * Define the following symbols for the preprocessor: - `__WXMSW__` to ensure you use the correct wxWidgets port. - `NDEBUG` if you want to build in release mode, i.e. disable asserts. - `WXUSINGDLL` if you are using DLL build of wxWidgets. * Add `` directory described above to the libraries path. -When using MSVC, the libraries are linked automatically using "#pragma -comment(lib)" feature of this compiler. With all the other compilers you also -need to: +When using MSVC, using `include\msvc` in the compiler include path has another +advantage: the header found in this directory ensures that all the required +libraries are linked automatically using `#pragma comment(lib)` feature of this +compiler. With the other compilers, or if you don't use `include\msvc` with +MSVC, you also need to: * Add the list of libraries to link with to the linker input. The exact list depends on which libraries you use and whether you built wxWidgets in