Error building Audacity (can't find wxWidgets)

OS: Windows 10
Audacity: 2.4.2

I am trying to build Audacity as per the instructions in
I have successfully built wxWidgets, and have added WXWIN to the environment. WXWIN points to the source (git repo).
setup0.h and setup.h are both present in the directory under \include\wx\msw
$WXWIN = ‘D:\Git_Projects\GSOC\audacity_wxWidgets\wxWidgets’

I am constantly getting stuck at the same point as in the attached photo. Using CMake-GUI, it says it cannot find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS …)

I have built wxWidgets using CMake-GUI, with Visual Studio 2019 as the generator.
I have mingw, msys also installed. Kindly help.

Have you tested that? (by rebooting and then building one of the wx sample projects)

Yep, built a new project wxWidgets_test with minimal.cpp source code. It worked perfectly.

I’m no expert on Windows (I usually use Linux), but I found a comment from another person that appears to have encountered the same problem. Unfortunately they gave only this comment about how they fixed it:

Aha, switching system to local got me over that hump.

Does that mean anything to you?

No, it doesn’t ring a bell. Anybody recently compiled it? I would love those steps, I’d follow those and check.

I’ve written to the developer’s mailing list to ask for an update. I’ll update this thread if I hear anything.

You could also try writing to the developer’s mailing list yourself if you want - details are here:

So check out this thread:

If you are on MSVC 16.9.0 or later you will need to follow the thread to its completion.

I hope this helps. :smiley:

Oh, and let us know how you make out.

I’ve posted a reply on that thread.

To recap, thanks a lot, this was a tremendous help. The ‘Build All succeeded’ was such a relief!

I noticed a few typos in your new build instructions, and 2 lines which could be made clearer.
Screenshot 2021-03-17 182103.png

I’m glad you were able to get it to work. :smiley:

Well, that wouldn’t be the first time… :wink: Do you care to share?

This should be changed to Visual Studio

In this part, is it necessary to open CMake-GUI? Following the rest of the instructions, it’s clear that there is no need for CMake-GUI to be opened. It certainly confused me for 2 minutes, when I opened CMake-GUI → tried to search for an ‘Open VS2019’ option :rofl:

==> Click on “Show advanced settings” (scroll down).
==> Change CMake generator: VS 16 2019 (was Ninja)
==> Click “Save and Generate CMake cache to load variables” once, then
==> Click “Save and Generate CMake cache to load variables” a second time
or select Project > Generate CMake Cache

c) Switch to the Ouput tab
==> Wait for “CMake generation finished”.
==> Check the Error List window:
you should have 0 Errors and 0 Warnings.


Maybe it can be elaborated a little more? Click "Save and Generate CMake cache to load variables" once, after this wait for some time for the output. It will either be 0 Errors and 0 Warnings, or 0 Errors and 1 Warning (Jack). After this output,  Click "Save and Generate CMake cache to load variables" one more time. This time, the output should be the same (in my case, it went from 1 warning to 0 warnings).

I'm suggesting a little more clarity on this because I clicked on it the first time, and the cursor switched to the loading cursor (the busy circle) and then back to normal. I thought the process was done, so I clicked on it a second time. The same happened. I was starting the next step, when the  output tab screen started showing some activity. It takes a couple of seconds to initiate. It's possible the next step will be started before the previous one completes execution. That's why.
The rest is all good, easy to follow! The 68 errors solution also can be appended to this build instruction.

Thanks a lot jademan 🙌

Thanks for your input, adi_ganti! :smiley: