Steps on How to Build Audacity for windows

Moderator note: please do not shout by using large typeface - It only makes it harder to read and it annoys the Froum elves. I removed the shouting for you.

Hi Guys and gals,

I am just starting to look at Audacity as a project to build for learning C++ I am new to C++ but not new to other languages. A challenge faces me but I plan to learn, maybe with a little welcome guidance from the forum.

So far I have done these steps and there are a few questions down at the end.

vs_community.exe C++ V13
Installed it.

and expanded to
C:\ wxWidgets-3.0.2

Downloaded the source from
placed in
C: \audacity-master

Copied the folders and files from
C: \audacity-master\wxWidgets_additions\ wxWidgets-3.0.2
C:\ wxWidgets-3.0.2

Set the environment variable in the “System variables” group
C:\ wxWidgets-3.0.2

Started C++
Loaded C:\ wxWidgets-3.0.2\build\msw\wx_dll.dsw

Visual Studio will automatically make functional changes to the following projects in order to open them. You will not be able to open these projects in the version of Visual Studio in which they were originally created.

  • adv, “C:\wxWidgets-3.0.2\build\msw\wx_adv.dsp”
  • aui, “C:\wxWidgets-3.0.2\build\msw\wx_aui.dsp”
  • base, “C:\wxWidgets-3.0.2\build\msw\wx_base.dsp”
  • core, “C:\wxWidgets-3.0.2\build\msw\wx_core.dsp”
  • gl, “C:\wxWidgets-3.0.2\build\msw\wx_gl.dsp”
  • html, “C:\wxWidgets-3.0.2\build\msw\wx_html.dsp”
  • media, “C:\wxWidgets-3.0.2\build\msw\wx_media.dsp”
  • net, “C:\wxWidgets-3.0.2\build\msw\wx_net.dsp”
  • propgrid, “C:\wxWidgets-3.0.2\build\msw\wx_propgrid.dsp”
  • qa, “C:\wxWidgets-3.0.2\build\msw\wx_qa.dsp”
  • ribbon, “C:\wxWidgets-3.0.2\build\msw\wx_ribbon.dsp”
  • richtext, “C:\wxWidgets-3.0.2\build\msw\wx_richtext.dsp”
  • stc, “C:\wxWidgets-3.0.2\build\msw\wx_stc.dsp”
  • wxexpat, “C:\wxWidgets-3.0.2\build\msw\wx_wxexpat.dsp”
  • wxjpeg, “C:\wxWidgets-3.0.2\build\msw\wx_wxjpeg.dsp”
  • wxpng, “C:\wxWidgets-3.0.2\build\msw\wx_wxpng.dsp”
  • wxregex, “C:\wxWidgets-3.0.2\build\msw\wx_wxregex.dsp”
  • wxscintilla, “C:\wxWidgets-3.0.2\build\msw\wx_wxscintilla.dsp”
  • wxtiff, “C:\wxWidgets-3.0.2\build\msw\wx_wxtiff.dsp”
  • wxzlib, “C:\wxWidgets-3.0.2\build\msw\wx_wxzlib.dsp”
  • xml, “C:\wxWidgets-3.0.2\build\msw\wx_xml.dsp”
  • xrc, “C:\wxWidgets-3.0.2\build\msw\wx_xrc.dsp”
  • wx_dll, “C:\wxWidgets-3.0.2\build\msw\wx_dll.sln”

So I click ok.

Wait a minute while it updates the 22 files.

I had no errors, but this warning with two messages

wx_dll.sln: Visual Studio needs to make non-functional changes to this project in order to enable the project to open in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without impacting project behavior.

wx_dll.sln: File successfully backed up as C:\wxWidgets-3.0.2\build\msw\Backup1\wx_dll.sln

wx_dll.v12.suo: File successfully backed up as C:\wxWidgets-3.0.2\build\msw\Backup1\wx_dll.v12.suo

wx_dll.sln: Solution migrated successfully

Question 1

Have I done everything right so far, or did I do anything stupid.?

Question 2

I read that after building wx_dll.dsw I can load next time wx_dll.sln and not need to do upgrades, at least for now… is that correct?

Question 3
Has building wx_dll.dsw created wx_dll which will be used by Audacity.

Question 4
Do I need to load wxWidgets each time I load the sourc eof Audacity before building Audacity.

On to compiling the Audacity code.

In C++ 13

This loads in 24 related projects, and then I see it parsing a ton of include files and eventually Ready.

Now I want to compile Audacity so I go to Build on the main menu
Select Build Audacity
Sit back and watch the action.
I can see warning related to types flashing past. eventually the result of the build is

22>c:\audacity-master\src\Audacity.h(194): fatal error C1083: Cannot open include file: ‘wx/defs.h’: No such file or directory
========== Build: 19 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

So I have one error there wx/defs.h

Question 5

If the build is without errors, would an Audacity.exe be in the
c:\audacity-master\win folder.

All the best to you all.


I have just spotted some error in my post.

I have folders

C:\ wxWidgets-3.0.2

Which in reality are without the space


There are no gals here. Even I am male despite my name. :wink:

As it says in the yellow box on you can ignore step 3.2 in compile.txt for wxWidgets additions if you already downloaded the patched widgets. Merging folders like it says in compile.txt 3.2 can be a bit tricky.

See above.

We suggest it as a time saving but you don’t have to do that if you don’t want to.

If you mean “created wx_dll.sln”, yes.

No - the WXWIN environment variable means that Audacity knows where to look for wxWidgets.

Yes, you’ll have to fix that one. As it says in compile.txt, try rebooting the computer so that the WXWIN environment variable is recongnised by Visual Studio.

The build will be in win\Release if you build release configuration of Audacity, or win\Debug if you build debug configuration.