wxWidgets 3.1.3 - Windows Build

Instructions for compiling under windows seem to be in flux at the moment and I noticed that the version of wxWidgets required for the next release is now 3.1.3 so I thought I would update. Following wiki instructions ( well partly at least ) I downloaded the “for audacity” version from github using the zip file. Unfortunately this doesn’t actually work if you also use the most recent Visual Studio to build using the 2019/version 16 and try to build from within the VS graphic user interface. I’m sure the pruning of the source and library stuff that Audacity doesn’t need has been done with good intentions but unfortunately even after you take all the projects that are not required out of the configuration there are still a few unresolved references to them in the base and core projects.

Instead I took the entire download from the main wxWidgets site then removed the unwanted projects leaving just the seven needed ones plus the custom project and this worked perfectly, albeit I have only tried compiling audacity 2.4.1 as released.

The required wx dlls ( hence projects ) are :-
core
base
adv
net
html
xml
qa

I’ve noted them here because the latest compile instructions no longer mention the required dlls. There may well be some reasons why more knowledgeable persons than me know this is a bad way to go about it but I thought it wouldn’t hurt to say what worked and what didn’t.

Hi,

I built 3.1.3 using Visual Studio 2017 professional using the solution file. I had no problems. However I cloned the git repo rather than downloading the zip. See my previous post for the commit ID I used. Was it only failing for Visual Studio 2019 for you?

I only tried VS2019 community edition so once I got something that worked I went no further. I wonder if an active git environment downloads any extra required files on demand?

Glad I found this thread. Got wxWidgets built on the third try after cloning from git rather than using downloaded zip.

Why is there no longer an AUDACITY.SLN file??? Every time I try to compile with the Inno application, it gives me a new and different error to solve. Now I see I’m supposed to use CMake? This used to be easy and now I’ve wasted over an hour just trying to build the solution file and I’m still not there. What exactly are the configuration settings for CMake? All this for an ASIO build. Thanks.

Did you look at the build.txt included in the source code?https://github.com/audacity/audacity/blob/master/win/build.txt

First, thanks for your reply and sorry for my frustrated tone. I’ve built for ASIO a dozen times before this, but can’t quite get this new process. I am up to this step:

78  2) Open the CMake GUI. 
79      Set the 'Where is the source code' location to where your copy of the git repo is. 
80      Set the 'Where to build the binaries' to where you want the results. 
81 
 
82     Click on configure. 
83     (notice where it found / did not find wxWidgets if it did not find wxwidgets check  
84     that you set WXWIN coreectly)

My environment variable is set correctly. I don’t see any reference to wxWidgets in the CMake Configuration:

Clipboard01.jpg

Ok, got it to pretty much build (2 modules failed) but it’s not including ASIO. In CMake, I added ASIOSDK_DIR and WXWIN path entries and configured platform to Win32. Any ideas how to get ASIO in there?

Sorry to hear that the new methodology isn’t quite working for you yet. Given that everyone working on it is an unpaid volunteer I will refrain from any criticism other than to quote the engineer’s motto of " if it ain’t broke don’t fix it". I’ll try the instructions out myself as soon as I can and see if there are any problems in my environment.

Thanks, I think the only thing I’m missing is how to tell CMake to include ASIO in the build solution. I have downloaded ASIO components from Steinberg and put them in my C:\RESOURCES\ASIOSDK2 directory according to previous instruction for compiling Audacity with ASIO. I have also set my ASIOSDK_DIR system environment variable.

There are some README files in the source, but the links back to Portaudio site for instruction on compiling with MSVC are broken. I have googled the topic, but for someone whose only previous experience with compiling is building this ASIO version of Audacity it is not comprehensible. Is it possible to go back to including the AUDACITY.SLN file with the source files? That worked every time.

Again, sorry for the attitude and I appreciate everyone’s time and effort.

P.S. In the meantime, I can stick with Audacity 2.4.1 which compiled with ASIO fine using the old procedure.

I’ve tried building Audacity 2.4.2 also. My process was: git clone audacity/audacity and audacity/wxwidgets (with --recurse-submodules). I’ve had partial success with MSVC2017. First, I opened wx_vc15, then compiled wxwidgets under RELEASE DLL, then ran CMAKE. CMAKE has no reference to ASIO, and reports GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND, GETTEXT_MSGMERGE_EXECUTABLE-NOTFOUND, wxWidgets_wxrc_EXECUTABLE-NOTFOUND, but still generates a project which can be compiled, and Audacity.exe still launches, even though “mod-null” and “mod-nyq-bench” fail due to linker errors, and ASIO support is not present as expected.
So it appears that I’ve been able to replicate the efforts by Apesbrain

Looking at the differences between 2.4.1 and 2.4.2.
From audacity/CMakeLists.txt: Audacity uses Python3 (3.7.7) rather than Python2, like win/build.txt claims.
A 64 bit build is now selected by default if available.
From audacity/cmake-proxies/wxWidgets/CMakeLists.txt, the required components are adv, base, core, html net, and qa.
From audicty/win:
there used to be a packages.config, which would include Gettext.Tools, which appears to be still referenced in the failing modules even though that file only ever existed in Audacity-2.4.1
finally, It appears as if the reason that the ASIO SDK is not getting found is because the whole win/Projects folder is missing from Audacity-2.4.1, but win/Projects/portaudio-v19/portaudio-v19.vcxproj is the only result from git grep ASIOSDK_DIR

Unfortunately, at the time Audacity 2.4.2 was released, support for building with ASIO was not ready, so Audacity 2.4.2 was released without it. The ability to build with ASIO support will return in the next Audacity release.

In the meantime, one of the Audacity developers has kindly written a patch for Audacity 2.4.2. The patch is available in this post: https://forum.audacityteam.org/t/asio-support-in-audacity-2-4-2/57964/1

Well I gave it my best shot but it was a bit of a disaster.
Started with a new windows 10 computer and the latest instructions, attempting to follow to the letter. I wanted to build the released version of 2.4.2 but not sure if this is what I actually downloaded. wxWidgets eventually went OK although if you follow the help file trail you get to many different alternatives so I used the command line method with the modifiers recommended for a 32 bit released DLL build.

Then we come to Python. I have never previously used the version of Python recommended but I’m not sure if that is relevant to Windows, the instructions are very vague on that. I did my best to download the Github tools but again many different options which are not very helpful if this is the only application you will ever want to build.

Then cmake. There is a command line cmake in visual studio community edition but there is no cmake-gui, so I downloaded and installed cmake ( latest version ) to get this. At this point everything went pretty much pear shaped, mainly because I had no idea what I was doing!

The basic procedure used to be fairly straightfoward and reasonably documented. Download wxWidgets, unzip and run the appropriate SLN to get 32 bit dlls as required. Set a couple of environment variables. Download the audacity source in zip format using the branch and/or tag which gives the version you want. Run the appropriate SLN to get the released 32 bit version of audacity. I am not sure why this has been abandoned but I hope its just temporary. ( Could it be linux fixation? )

Call me lazy but I’ll be sticking with version 2.4.1 for now.

Quite the reverse. I think I’m the only member of Audacity Team to use Linux as my primary OS. All other team members primarily use Windows 10 or macOS.