Steps on How to Build Audacity for windows

Building and customizing Audacity from the source code.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Steps on How to Build Audacity for windows

Permanent link to this post Posted by Andy_Audacity » Sat Jun 10, 2017 9:51 am

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.

Downloaded
vs_community.exe C++ V13
Installed it.

Downloaded
https://github.com/audacity/wxWidgets/a ... -fixes.zip
and expanded to
C:\ wxWidgets-3.0.2

Downloaded the source from
https://github.com/audacity/audacity/
placed in
C: \audacity-master

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

Set the environment variable in the "System variables" group
to:
WXWIN
C:\ wxWidgets-3.0.2

Then
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.


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

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

3,
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
C:\audacity-master\win\audacity.sln

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.

Andy
Andy_Audacity
 
Posts: 2
Joined: Sat Jun 10, 2017 8:35 am
Operating System: Windows 7

Re: Steps on How to Build Audacity for windows

Permanent link to this post Posted by Andy_Audacity » Sat Jun 10, 2017 12:24 pm

I have just spotted some error in my post.

I have folders

C:\ wxWidgets-3.0.2

Which in reality are without the space

C:\wxWidgets-3.0.2
Andy_Audacity
 
Posts: 2
Joined: Sat Jun 10, 2017 8:35 am
Operating System: Windows 7

Re: Steps on How to Build Audacity for windows

Permanent link to this post Posted by Gale Andrews » Sat Jun 10, 2017 12:44 pm

There are no gals here. Even I am male despite my name. ;)

As it says in the yellow box on http://wiki.audacityteam.org/wiki/Developing_On_Windows 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.

Andy_Audacity wrote:everything right

See above.

Andy_Audacity wrote: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?

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

Andy_Audacity wrote:Is building wx_dll.dsw created wx_dll which will be used by Audacity.

If you mean "created wx_dll.sln", yes.

Andy_Audacity wrote:Do I need to load wxWidgets each time I load the source of Audacity before building Audacity.

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

Andy_Audacity wrote:In C++ 13
C:\audacity-master\win\audacity.sln

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 ==========

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.

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

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


Gale
Gale Andrews
Quality Assurance
 
Posts: 26093
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10


Return to Compiling Audacity



Who is online

Users browsing this forum: No registered users and 10 guests