Incorrect settings in Visual studio build files (Issue #23676)

41 views
Skip to first unread message

antonyvholmes

unread,
Jul 1, 2023, 5:54:41 AM7/1/23
to wx-...@googlegroups.com, Subscribed

After downloading the latest wxWidgets 3.2.2.1 and built the wxWidgets libraries from source in Visual Studio 2019 community. My app had linker errors. Checking the settings for the x64 and Win32 settings, release and debug, the builds for the static libraries were configures to use the DLL (dynamic) runtime libraries in the C++ settings, which meant manually changing the settings and rebuilding the libraries again. Can you take a look at this.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23676@github.com>

PB

unread,
Jul 1, 2023, 8:44:09 AM7/1/23
to wx-...@googlegroups.com, Subscribed

This is not a bug but a feature and is the default for the MSVS solutions, the bundled makefiles, and the cmakefile. Static linking building wxWidgets static libraries, but they still link to the compiler runtimes dynamically (as recommended by Microsoft).

If you really want to build wxWidgets linking with MSVCRT statically using provided MSVS solutions, it would be probably easiest by changing the value of wxRuntimeLibs from dynamic to static, as described here.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23676/1615891255@github.com>

VZ

unread,
Jul 2, 2023, 12:08:33 PM7/2/23
to wx-...@googlegroups.com, Subscribed

Closed #23676 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23676/issue_event/9700514867@github.com>

VZ

unread,
Jul 2, 2023, 12:08:34 PM7/2/23
to wx-...@googlegroups.com, Subscribed

As @PBfordev wrote (thanks!), this is intentional. Using static CRT libraries is officially not recommended and so is not the default, even if you can still change it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23676/1616714204@github.com>

wsu

unread,
Jul 2, 2023, 3:46:45 PM7/2/23
to wx-dev
Why is this not recommended?  Is it a general preference that Microsoft CRT patches are automatically used?  Or is there some more specific concern?

Vadim Zeitlin

unread,
Jul 2, 2023, 4:21:29 PM7/2/23
to wx-...@googlegroups.com
On Sun, 2 Jul 2023 12:46:45 -0700 (PDT) wsu wrote:

w> Why is this not recommended? Is it a general preference that Microsoft CRT
w> patches are automatically used?

Yes, I think this is the main argument.

Regards,
VZ
Reply all
Reply to author
Forward
0 new messages