I’m here because I believe I have tried EVERYTHING in order to build audacity 2.0.3 with wxWidgets 2.8.12 on Windows 7
Audacity project does compile well but I can’t get the final exe file.
I’m using VS C++ 2008 express, SDK 7.1 for Windows 7.
I compiled every configuration of wxWidgets 2.8.12 (Debug, Release, Dll Debug, Dll Release, Dll Unicode Debud, Dll Unicode release). I had no problem here and I even compiled a few samples. I set the WXWIN variable correctly.
Then, when I try to complie audacity I get many errors like this in the BuildLog.htm:
echo Project : error PRJ0019: A tool returned an error code from “Copying mand5”
Also, I get other few (11) compilation errors:
C:wxWidgets-2.8.12includewx/app.h(230) : warning C4002: too many actual parameters for macro ‘Yield’
C:wxWidgets-2.8.12includewx/app.h(230) : error C2059: syntax error : ‘{’
C:wxWidgets-2.8.12includewx/app.h(230) : error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body
C:wxWidgets-2.8.12includewx/app.h(406) : warning C4002: too many actual parameters for macro ‘Yield’
C:wxWidgets-2.8.12includewx/app.h(406) : error C2059: syntax error : ‘=’
C:wxWidgets-2.8.12includewx/app.h(406) : error C2238: unexpected token(s) preceding ‘;’
C:wxWidgets-2.8.12includewx/msw/app.h(38) : warning C4002: too many actual parameters for macro ‘Yield’
C:wxWidgets-2.8.12includewx/msw/app.h(38) : error C2208: ‘bool’ : no members defined using this type
c:audacity-srcsrcwidgets…/Envelope.h(106) : error C2589: ‘(’ : illegal token on right side of ‘::’
c:audacity-srcsrcwidgets…/Envelope.h(106) : error C2059: syntax error : ‘::’
c:audacity-srcsrcwidgets…/Envelope.h(106) : error C2589: ‘(’ : illegal token on right side of ‘::’
c:audacity-srcsrcwidgets…/Envelope.h(106) : error C2589: ‘(’ : illegal token on right side of ‘::’
…srcexportExportCL.cpp(490) : error C2039: ‘Yield’ : is not a member of ‘wxApp’
C:wxWidgets-2.8.12includewx/msw/app.h(26) : see declaration of ‘wxApp’
I didn’t think I must change the source code, but it was necessary for 3 files. Here are the modifications:
1 - Add a #define NOMINMAX at the very beginning of Audacity.h
2 - Add a #define PLATFORM_MAX_PATH 260 in the SimpleBlockFile.cpp
3 - Add a #include “wx/msw/winundef.h” in app.h
Now I wonder whether the developers or everyone else get these same errors or not… When I check out a new version, will I have to do it all again?
You should not be getting those errors - I compile every day with the same environment and Windows SDK as you.
In Visual Studio at Project >Audacity_Properties >Configuration_Properties >C/C++ > Precompiled_Headers do you see Precompiled Header File .$(ConfigurationName)/audacity.pch ?
Did your original errors before you modified the Audacity source occur when you were linking to the ASIO SDK? Or before you linked to the ASIO SDK?
To compile with ASIO, please see wincompile.txt (scroll down).
Also see “HELP! I get linker errors!” in that document.
I don’t think we can help if you are modifying the Audacity sources in unknown ways. If your intention is to build with ASIO then it is best to do a complete fresh checkout of the Audacity sources, make sure you have defined an environment variable called ASIOSDK_DIR, reboot, then try to build Unicode Release of Audacity again.
1 - Add a #define NOMINMAX at the very beginning of Audacity.h
2 - Add a #define PLATFORM_MAX_PATH 260 in the SimpleBlockFile.cpp
3 - Add a #include “wx/msw/winundef.h” in app.h
These are the only modifications I made in the code in order to eliminate compiling errors.
No. I didn’t play with anything about ASIO yet. I was just trying to build Audacity alone first.
I read but I couldn’t figure out a way to fix it.
Thank you Gale.
If you think I can get a binary file of Audacity with Asio for window 7 from someone else, please let me know.
Thanks,
André
Where did you get 2.0.3 sources from? If you have not already done so, I would suggest installing Tortoise SVN then checking out either the latest Audacity SVN code or the 2.0.3 tagged release from http://audacityteam.org/community/developers#svn .
In my experience if you want ASIO, it’s best to build linking to ASIO from a separate Audacity tree.
If you want to go back to Audacity without ASIO, remove the ASIOSDK_DIR environment variable, reboot, checkout a fresh Audacity into completely new tree then build from that.
If you build Audacity, add or remove the ASIOSDK_DIR environment variable then build from the same tree, you can hit problems.
You cannot, because an ASIO-enabled build is only for personal use and cannot be distributed to anyone else.
But if you can compile the development code without ASIO (and there is no reason you can’t) but you cannot compile with ASIO, the current development code now supports JACK for Windows . In turn, JACK supports ASIO.
So if you add a JACKSDK_DIR environment variable and set that variable to the path where you have JACK installed, Audacity will be compiled with JACK support. Configure JACK to use ASIO (see farther down http://jackaudio.org/jack_on_windows ) then start JACK. Then set the Audacity “Host” choice in Device Toolbar to JACK and you will have ASIO support in Audacity with (almost) no more latency than native ASIO support.
Note that because JACK is a way to get ASIO support in Audacity, it has not been decided if we’ll be releasing Audacity with JACK support. So as yet, please don’t distribute your JACK-enabled Audacity build to anyone else.
First, I realized that I was not actually using SKD 7.1 since I had only installed it but not registered for VS2008. I was actually using SKD 6.0a that comes with VS2008.
Well, first I configured SDK 7.1 to work with VS2008 (tricky… it took me a long time…)
Then, I rebuilt wxWidgets (only Dll Unicode Release).
Then I tried to rebuild Audacity from a fresh SVN checkout (HEAD version), but… I got again the “MAX_PATH undeclared” error…
I was really about to give up. But I tried once again…
I looked for the definition of “MAX_PATH”. I found out that another macro was defined: PLATFORM_MAX_PATH = 260 in Audacity.h
But PLATFORM_MAX_PATH was being set again to MAX_PATH since WXMSW was defined. Well, I removed MAX_PATH and put 260 directly (Audacity.h ln 103). Then I cleaned the project and rebuilt. Worked like a charm (lot of warnings, by the way)…
Concluding, I had to change one line of the code… I browsed the internet and found other few people struglling with the same problem. Isn’t it worth modifying the souce code in SVN?
Well, thanks for your help. I really like Audacity and I’m happy that a managed to build it (but it was not easy at all). Now, I’m going to try building with ASIO support.
I would like to add another important observation: When compiling wxWidgets I had to set “wxUSE_ODBC” to 1 in C:wxWidgets-2.8.12includewxmswsetup.h. Then I compile the whole wxWidgets solution in DLL Unicode Release.
Otherwise, I would get errors with the Yield marcro, such as "error C2039: ‘Yield’ : is not a member of ‘wxApp’ " while trying to build Audacity
Everyone on Audacity Team builds with “wxUSE_ODBC” set to 1, because to enable extra accessibility we replace “wxWidgets-2.8.12includewxmswsetup.h” with the “setup.h” in “audacitywinwxWidgets_additions” which sets “wxUSE_ODBC” to 1. This is as per wincompile.txt ( http://audacity.googlecode.com/svn/audacity-src/trunk/win/compile.txt ) .
Did you compile the whole widgets build or only compile the five Widgets solutions recommended in wincompile.txt (namely adv, base, core, html and net)?