Compiling Audacity on Win 10 VC++ express 2013

Building and customizing Audacity from the source code.
Forum rules
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
Post Reply
Kiamur
Posts: 4
Joined: Sun Aug 12, 2018 11:14 am
Operating System: Windows 10

Compiling Audacity on Win 10 VC++ express 2013

Post by Kiamur » Sun Aug 12, 2018 11:36 am

Hi guys,

just recently, the same thread title appeared in this forum, but the answers didn't help my problem...

Okay, here are my specs:
- Windows 10
- Microsoft Visual Studio Express 2013 (Platform Toolset v120)
- audacity/WxWidget src from: https://github.com/audacity
- cloned both repositories to D:\Daten\audacity giving me - D:\Daten\audacity\wxWidgets and D:\Daten\audacity\audacity
- checkout and compiled branch (audacity-fixes-3.1.1) -> WxWidgets compiled without error (debug release)
- under D:\Daten\audacity\wxWidgets\lib\vc_dll several dlls are created.
- setup system wide environment variable WXWIN=D:\Daten\audacity\wxWidgets
- open VC++ Express 2013 and opened D:\Daten\audacity\audacity\win\audacity.sln (git repo is on branch master)
- tried to compile the debug version, but got message, that Platform Toolset v141 could not be found.
- Changed project settings to use Platform Toolset v120 for all projects.
- Compiled severeal times but ended up with errors

Code: Select all

Error	1	error C2061: syntax error : identifier 'CacheLine'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	2	error C2143: syntax error : missing ';' before 'std::atomic<unsigned int>'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	3	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Warning	4	warning C4183: 'alignas': missing return type; assumed to be a member function returning 'int'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	5	error C2061: syntax error : identifier 'CacheLine'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	6	error C2143: syntax error : missing ';' before 'std::atomic<unsigned int>'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	7	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	8	error C2535: 'int RingBuffer::alignas(void)' : member function already defined or declared	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Warning	9	warning C4183: 'alignas': missing return type; assumed to be a member function returning 'int'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	10	error C2061: syntax error : identifier 'CacheLine'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	11	error C2143: syntax error : missing ';' before 'std::atomic<unsigned int>'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	12	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Warning	13	warning C4183: 'alignas': missing return type; assumed to be a member function returning 'int'	d:\daten\audacity\audacity\src\ringbuffer.h	50	1	Audacity
Error	14	error C2061: syntax error : identifier 'CacheLine'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	15	error C2143: syntax error : missing ';' before 'std::atomic<unsigned int>'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	16	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Error	17	error C2535: 'int RingBuffer::alignas(void)' : member function already defined or declared	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Warning	18	warning C4183: 'alignas': missing return type; assumed to be a member function returning 'int'	d:\daten\audacity\audacity\src\ringbuffer.h	51	1	Audacity
Warning	19	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2044	1	Audacity
Warning	20	warning C4100: 'state' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2044	1	Audacity
Warning	21	warning C4100: 'pParent' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2063	1	Audacity
Warning	22	warning C4100: 'rect' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2062	1	Audacity
Warning	23	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2120	1	Audacity
Warning	24	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2225	1	Audacity
Warning	25	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2249	1	Audacity
Warning	26	warning C4100: 'state' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2249	1	Audacity
Warning	27	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2269	1	Audacity
Warning	28	warning C4100: 'pProject' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	2456	1	Audacity
Warning	29	warning C4100: 'state' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	3031	1	Audacity
Warning	30	warning C4100: 'pLatestCell' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	3775	1	Audacity
Warning	31	warning C4100: 'pClickedTrack' : unreferenced formal parameter	d:\daten\audacity\audacity\src\widgets\ruler.cpp	3775	1	Audacity
Error	32	error C2280: 'std::unique_ptr<SnapManager,std::default_delete<_Ty>> &std::unique_ptr<_Ty,std::default_delete<_Ty>>::operator =(const std::unique_ptr<_Ty,std::default_delete<_Ty>> &)' : attempting to reference a deleted function	c:\program files (x86)\microsoft visual studio 12.0\vc\include\xmemory0	611	1	Audacity
	33	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	63	17	Audacity
	34	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	64	15	Audacity
	35	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	74	17	Audacity
	36	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	75	15	Audacity
	37	IntelliSense: no instance of overloaded function "std::min" matches the argument list
            argument types are: (size_t, <error-type>)	d:\Daten\audacity\audacity\src\RingBuffer.cpp	82	20	Audacity
	38	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	103	17	Audacity
	39	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	104	15	Audacity
	40	IntelliSense: no instance of overloaded function "std::min" matches the argument list
            argument types are: (size_t, <error-type>)	d:\Daten\audacity\audacity\src\RingBuffer.cpp	110	20	Audacity
	41	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	136	15	Audacity
	42	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	137	17	Audacity
	43	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	149	15	Audacity
	44	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	150	17	Audacity
	45	IntelliSense: no instance of overloaded function "std::min" matches the argument list
            argument types are: (size_t, <error-type>)	d:\Daten\audacity\audacity\src\RingBuffer.cpp	156	20	Audacity
	46	IntelliSense: identifier "mEnd" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	177	15	Audacity
	47	IntelliSense: identifier "mStart" is undefined	d:\Daten\audacity\audacity\src\RingBuffer.cpp	178	17	Audacity
	48	IntelliSense: explicit type is missing ('int' assumed)	d:\Daten\audacity\audacity\src\RingBuffer.h	50	4	Audacity
	49	IntelliSense: constant "RingBuffer::CacheLine" is not a type name	d:\Daten\audacity\audacity\src\RingBuffer.h	50	12	Audacity
	50	IntelliSense: expected a ';'	d:\Daten\audacity\audacity\src\RingBuffer.h	50	23	Audacity
	51	IntelliSense: explicit type is missing ('int' assumed)	d:\Daten\audacity\audacity\src\RingBuffer.h	51	4	Audacity
	52	IntelliSense: constant "RingBuffer::CacheLine" is not a type name	d:\Daten\audacity\audacity\src\RingBuffer.h	51	12	Audacity
	53	IntelliSense: expected a ';'	d:\Daten\audacity\audacity\src\RingBuffer.h	51	23	Audacity
I can make sense from these errors and do not find anything with my websearch. Any ideas?

Do I use the wrong Visual studio Express version (I found that Visual Studio Express 2013 should just work).

Please, any ideas welcome.

Regards,
Maik
Last edited by steve on Sun Aug 12, 2018 11:57 am, edited 1 time in total.
Reason: code tags added to improve readability

steve
Site Admin
Posts: 48994
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by steve » Sun Aug 12, 2018 11:59 am

Which version of Audacity are you trying to build, and why?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kiamur
Posts: 4
Joined: Sun Aug 12, 2018 11:14 am
Operating System: Windows 10

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by Kiamur » Sun Aug 12, 2018 2:42 pm

Hi,

I just would like to build audacity for the sake of it.

I'd like to learn a little bit of C++ (I'm a 10+ year Java developer and also using C for embedded stuff a lot).

Since I would like to improve my C++ understanding and am a hobby musician, too, I'm very interested in this project.

So do you suggest, instead of building the master branch of audacity, to just use a particular version? Maybe 3.1.1, like WxWidget?

Regards,
Maik

steve
Site Admin
Posts: 48994
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by steve » Mon Aug 13, 2018 1:18 am

I'd suggest that you initially build the release version (Audacity 2.2.2).
https://github.com/audacity/audacity/re ... city-2.2.2

The build instructions are in /win/compile.txt

Ensure that you follow the instructions exactly, particularly concerning which version of things to use. Ensure that WxWidgets is built correctly and works, before attempting to build Audacity.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kiamur
Posts: 4
Joined: Sun Aug 12, 2018 11:14 am
Operating System: Windows 10

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by Kiamur » Mon Aug 13, 2018 9:10 am

Thanks Steve, that worked.

Would it have been the same, if I cloned the repo with git and switched to the according branches? (git checkout ....)

I'm asking, because I think, yesterday i did exactly that with both repositories switched to the according branches, but it didn't work (many compile errors in WxWidgets). However, I suppose I may have done something wrong unintentionally.

Right now, I have a good starting point.

Regards,
Maik

steve
Site Admin
Posts: 48994
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by steve » Mon Aug 13, 2018 9:46 am

Kiamur wrote:
Mon Aug 13, 2018 9:10 am
Thanks Steve, that worked.
Excellent :D
Kiamur wrote:
Mon Aug 13, 2018 9:10 am
Would it have been the same, if I cloned the repo with git and switched to the according branches? (git checkout ....)

I'm asking, because I think, yesterday i did exactly that with both repositories switched to the according branches, but it didn't work (many compile errors in WxWidgets). However, I suppose I may have done something wrong unintentionally.
If you want to get into working with the Audacity code, you really need to be working with the current development code. However, we are currently transitioning from Wx3.0.2 to Wx3.1.1, AND from VS 2013 to VS 2017. The build instructions are not currently up to date with these changes, so it can get very confusing.

We are currently working towards the release of Audacity 2.3.0, and the build instructions should be pretty well up to date by the time 2.3.0 is released. That will be a good time to switch to the cloned git repo.

For the Audacity code, you could clone the repo and checkout the 2.2.2 tag (then checkout "HEAD" when build instructions become available), but WxWidgets 3.1.1 is a bit awkward. By default, checking out Wx3.1.1 does not include the full source code - some dependencies must be cloned as an additional step, otherwise WxWidgets will not build. Instructions for how to do this correctly will be in the updated documentation.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kiamur
Posts: 4
Joined: Sun Aug 12, 2018 11:14 am
Operating System: Windows 10

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by Kiamur » Sun Aug 26, 2018 7:22 am

Hi Steve,

thanks again for the information!
hecking out Wx3.1.1 does not include the full source code - some dependencies must be cloned as an additional step
By this, do you mean, that I would have to perform a

Code: Select all

git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
after cloning the Wx repository? Is there another step required than that? Code patching? Or do I just have to check out Wx3.1.1, clone all the dependencies with the command above and that's it?
I would very much like to work on the git repository from the start, in order to make switching more easy later on.

Regards,
Maik

roadsterUK
Posts: 54
Joined: Sat Apr 15, 2017 8:00 pm
Operating System: Windows 10

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by roadsterUK » Sun Aug 26, 2018 3:14 pm

As a matter of fact I have just tried the latest master source ( 2.3.0 alpha? ) using VS2017 and have found it the most trouble free compilation that I have ever experienced. Apart from needing to update my VS2017 in line with latest Windows10 patches, the compilation of WXwidgets 3.1.1 and Audacity itself both went smoothly including ASIO option. The master build files had the correct configuration exclusions ( help for example) to allow it to work "out-of-the-box". There is still an ASIO bug which prevents Audacity from matching the file sample rate correctly on first play if the rate changes between files/tracks. In effect if the sample rate changes you have to click the play button a second time to get it to match. This is irrespective of whether the windows and device default sample rates match what you are trying to play. Obviously I haven't done much more than scratch the surface of the Audacity features but it seems more responsive and generally crisper than the previous version.

steve
Site Admin
Posts: 48994
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling Audacity on Win 10 VC++ express 2013

Post by steve » Sun Aug 26, 2018 6:47 pm

Kiamur wrote:
Sun Aug 26, 2018 7:22 am
By this, do you mean, that I would have to perform a

Code: Select all

git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
Yes, exactly that.
Or, from the Audacity repository:

Code: Select all

git clone --recurse-submodules https://github.com/audacity/wxWidgets.git
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply