# Compiling Audacity for ASIO

**URL:** <https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830>\
**Category:** Compiling Audacity\
**Created:** [February 9, 2019, 6:43pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830 "2019-02-09T18:43:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 9, 2019, 6:43pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/1 "2019-02-09T18:43:02Z")

</div>

Hello Everybody:  
In the past, I compiled Audacity for ASIO many times without failure using the VS 2013 and wxWidgets3.0.2. This time I tried to use VS 2017 and wxwidgets3.1.1 with file missing problem. The first step is to compile wxwidgets first. I downloaded 3.1.1 from [GitHub.com/wxwidgets/wxwidgets/release/3.1.1](http://GitHub.com/wxwidgets/wxwidgets/release/3.1.1). There are many files and I chose wxMSW-3.1.1-setup.exe. After downloading, I double-clicked the execution file to install without a hitch. Then I set up the environment variable. I did not use the special git software to download this execution file. After the wxwidgets download, I used the git software to download the audacity source code. In this code file under the win directory, there is a Build.txt. There is one instruction I do not understand. Please spare me for my ignorance. The instruction is from htpps://github.com/audactiy/wxwidgets/blob/v3.1.1/README-GIT.md. It says:  
Before building from Git sources under Windows, you need to copy the file include/wx/msw.setup0.h to included/wx/msw/setup.h. At first, I was totally lost. Where do I get this setup0.h file? At last, I found the file from the wxwidgets I cloned from GitHub using git-bash and recurse-submodules. Please remember this is not the wxwidgets I installed in my computer. Is this the right file? I do not know for sure. I copied this file to the wxWidgets3.1.1 I installed using the execution file I downloaded. I did see a setup.h file in include/wx/msw in the wxwidget3.1.1 I installed using the execution file. What I did was to file setup.h to setupOLD. Then I copied the setup0.h to the same location and renamed it to setup.h. Did I do it right?  
Then I began to compile the wxWidgets3.1.1 by double-clicking build/wx\_vc15.sln. VS gave me some error messages. I copy one of the messages here.  
11\>d:\wxwidgets-3.1.1\include\wx\platform.h(148): fatal error C1083: Cannot open include file: ‘wx/setup.h’: No such file or directory  
10\>d:\wxwidgets-3.1.1\include\wx\platform.h(148): fatal error C1083: Cannot open include file: ‘wx/setup.h’: No such file or directory  
11\>Done building project “wx\_net.vcxproj” – FAILED.  
10\>Done building project “wx\_xml.vcxproj” – FAILED.  
6\>wx\_wxtiff.vcxproj → D:\wxWidgets-3.1.1\build\msw....\lib\vc\_dll\wxtiff.lib  
4\>wx\_wxpng.vcxproj → D:\wxWidgets-3.1.1\build\msw....\lib\vc\_dll\wxpng.l  
It appeared VS could not fine the setup.h file. Where did it go wrong? Please help.  
Also which Microsoft SDK should I use for VS2017, 8.1 or 10…something?  
Thanks.

---

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 9, 2019, 10:50pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/2 "2019-02-09T22:50:31Z")

</div>

I am replying to my own post. If I neglect the instruction in build.txt step 3. wxWidgets 2) [https://github.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md](https://github.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md), I could compile wxWidgets-3.1.1 successfully without errors. So what is this instruction for?

---

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 10, 2019, 5:14am UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/3 "2019-02-10T05:14:43Z")

</div>

I am here to post a thread to announce that finally I compiled Audacity for ASIO. Follow the instructions on build.txt. But do not follow the instructions from [https://gitbub.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md](https://gitbub.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md). First, I followed it and it got me into many errors. I ignored it and I successfully compile wxwidgets3.1.1. Compiling Audacity was then uneventful. In order to make Audacity to work, you need to copy some files from VS2017 to the RELEASE folder. Again, this is for use with ASIO only. All the instructions posted on the internet are for Audacity developers, not for average Joes. It does not make any sense to any average Joe. I am not able to get the HELP manual to work. It does not hurt anything even this particular Help project fails.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [February 10, 2019, 12:31pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/4 "2019-02-10T12:31:00Z")

</div>

Glad you got it working, but a little concerned that you say there was an incorrect step.  
For what it’s worth, the instructions, as written, worked for me, though I initially had repeated problems getting the environmental variable to stick. Once the environmental variable was properly set, the processes of building and installing went smoothly without a hitch.

> [https://gitbub.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md](https://gitbub.com/audacity/wxwidgets/blob/v3.1.1/README-GIT.md)

That link is not working for me.  
I guess you meant:

> <https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md>

> [@](#):
>
> If I neglect the instruction in build.txt step 3

I don’t see any numbered steps on [https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md](https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md)  
Which step are you referring to?

---

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 10, 2019, 9:29pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/5 "2019-02-10T21:29:27Z")

</div>

Hi Steve:  
The link you post is correct. The step 3 is the item 3 on build.txt. What is the link really meant to do? I downloaded the executable for wxwidget3.1.1. After installation, there is no setup0.h in the include directory, only the setup.h  
Also, after I change to ASIO4ALL, it take about two minutes to launch the Audacity. Did I do anything wrong? If I have it on MIME, it only takes a few seconds to launch.  
I was able to compile the HELP successfully. But the help manual was not there after launching Audacity.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [February 10, 2019, 9:43pm UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/6 "2019-02-10T21:43:45Z")

</div>

> [@](#):
>
> The step 3 is the item 3 on build.txt.

This build.txt: [https://github.com/audacity/audacity/blob/master/win/build.txt](https://github.com/audacity/audacity/blob/master/win/build.txt)

> 1. wxWidgets:
> 
> 1. Clone wxWidgets and checkout 3.1.1 from the Audacity fork of the  
> wxWidgets project:  
> [GitHub - audacity/wxWidgets: Cross-Platform GUI Library - Report issues here: http://trac.wxwidgets.org/](https://github.com/audacity/wxWidgets/)
> 
> for example, in the git-bash command line  
> mkdir ./wxWidgets  
> cd ./wxWidgets  
> git clone --recurse-submodules \> [GitHub - audacity/wxWidgets: Cross-Platform GUI Library - Report issues here: http://trac.wxwidgets.org/](https://github.com/audacity/wxWidgets/)
> 
> IF you forgot the --recurse-submodules, you can correct that later by:  
> git submodule update --init
> 
> 1. Follow instructions for building at  
> [https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md](https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md)  
> [https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/msw/install.txt](https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/msw/install.txt)
> 
> DO set WXWIN to the appropriate directory where you installed wxWidgets.  
> To do that, open a cmd.exe window, and type:  
> set WXWIN=C:\wxWidgets-3.1.1
> 
> You will be building a dll version with MSVC2017 IDE, so…
> 
> In MSVC 2017 open wx\_vc15.sln, and select dll, release.  
> Then build.
> 
> 1. Having got this far, it is well worth trying out building some wxWidgets  
> examples to confirm that building has worked OK

---

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 12, 2019, 2:50am UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/7 "2019-02-12T02:50:53Z")

</div>

I want to make it crystal clear. The Build.txt in principle works. But Just do not follow item 3, sub-item 2, the first link for ASIO compilation. Compile Audacity for ASIO is very simple as long as you get the right instructions. Most of the instructions are for Audacity developers using different platforms and are not intended for general audience. Remember one thing please. I am using Windows 10.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [February 12, 2019, 10:29am UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/8 "2019-02-12T10:29:42Z")

</div>

> [@](#):
>
> But Just do not follow item 3, sub-item 2

This is item 3, sub-item 2 (below). Which part of it are you referring to?

> 1. Follow instructions for building at  
> [https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md](https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md)  
> [https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/msw/install.txt](https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/msw/install.txt)
> 
> DO set WXWIN to the appropriate directory where you installed wxWidgets.  
> To do that, open a cmd.exe window, and type:  
> set WXWIN=C:\wxWidgets-3.1.1
> 
> You will be building a dll version with MSVC2017 IDE, so…
> 
> In MSVC 2017 open wx\_vc15.sln, and select dll, release.  
> Then build.

---

<div class="post-metadata">

**Author:** ![cmjone](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/c/eada6e/32.png) [@cmjone](https://forum.audacityteam.org/u/cmjone)\
**Post date:** [February 13, 2019, 2:53am UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/9 "2019-02-13T02:53:49Z")

</div>

The first link ----[https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md](https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md). When you open up the link, you will see “copy setup0.h” to setup.h. This setup.h file is in the Include folder of wxWidgets3.1.1. I think the author of this just copied a similar statement from the wxWidgets website. It does not tell you where to get setup0.h. I was so frustrated and I happened to brows the wxWidgets website and found the same statement without any elaboration. What is it for? Only the author and the wxWidgets people know. If you only want to compile Audacity for use with ASIO in Windows 10 . please ignore this instruction. Even in the second link, the instructions are not pertinent. You can ignore it also. You do need to set the environment variable WXWIN correctly though.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [February 13, 2019, 11:35am UTC](https://forum.audacityteam.org/t/compiling-audacity-for-asio/51830/10 "2019-02-13T11:35:12Z")

</div>

> [@](#):
>
> This setup.h file is in the Include folder of wxWidgets3.1.1

I don’t understand what you are saying. The only things I see in include folder (“wxWidgets/include/”) are “msvc/wx” and “wx”. I’m looking here: [https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include](https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include)

However, I do see that there is a file called “setup.h” in “/include/msvc/wx/” ([https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include/msvc/wx](https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include/msvc/wx)). Perhaps that is what confused you?  
  
  
Here’s the instructions that you are referring to, with links added to the text:

> [@https://github.com/audacity/wxWidgets/blob/v3.1.1/README-GIT.md](#):
>
> Building from Git Sources
> 
> Please use --recurse-submodules option with the initial git clone. If you had already cloned the repository without this option, please run git submodule update --init to also get all 3rd party libraries code.
> 
> Before building from Git sources under Windows, you need to copy the file [include/wx/msw/](https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include/wx/msw)setup0.h to [include/wx/msw/](https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1/include/wx/msw)setup.h.  
> …

In other words, rename setup0.h to setup.h (but the wxWidgets developers recommend copying rather than renaming, so that you still have the original setup0.h file)

You should end up with this (where “steup.h” is a copy of “setup0.h” of the same folder):

![directory.png](https://forum.audacityteam.org/uploads/default/original/3X/b/4/b42d85db38d3aa3ed52ad0bbd471f5d962c249ce.png)
