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.
This commit is contained in:
Vadim Zeitlin 2023-11-05 02:25:32 +01:00
parent 23abd00d0b
commit 523979b1f1

View file

@ -455,18 +455,22 @@ Here is what you need to do:
- compiler - compiler
- resource compiler - resource compiler
include paths. include paths.
* If using MSVC, prepend `$WXWIN\include\msvc` to the include paths too. * Append `<wx-lib-dir>\mswu[d]` to the include paths, where "d" should
Otherwise, append `<wx-lib-dir>\mswu[d]` to the include paths, where "d" should
be used for debug builds only. 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: * Define the following symbols for the preprocessor:
- `__WXMSW__` to ensure you use the correct wxWidgets port. - `__WXMSW__` to ensure you use the correct wxWidgets port.
- `NDEBUG` if you want to build in release mode, i.e. disable asserts. - `NDEBUG` if you want to build in release mode, i.e. disable asserts.
- `WXUSINGDLL` if you are using DLL build of wxWidgets. - `WXUSINGDLL` if you are using DLL build of wxWidgets.
* Add `<wx-lib-dir>` directory described above to the libraries path. * Add `<wx-lib-dir>` directory described above to the libraries path.
When using MSVC, the libraries are linked automatically using "#pragma When using MSVC, using `include\msvc` in the compiler include path has another
comment(lib)" feature of this compiler. With all the other compilers you also advantage: the header found in this directory ensures that all the required
need to: 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 * 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 depends on which libraries you use and whether you built wxWidgets in