Visual Studio 2010 Pro

I got my copy of Visual Studio 2010 Pro last week and am rarin to compile audicity. I am using the instructions from the developing on windows page on tha audacityteam.org site. When I get to the part about building wxWidgets, I have downloaded it, I open the instructions and nowhere does it mention Windows 7, let alone x64. Am I out of luck here? I want to contribute, but thats whetre I am guys. I’m on Windows 7 64 bit, I’m using VS 2010 Pro. Can I proceed with a build guide that doesn’t reference w7 64? I’m going to scour wxWidghets for more info and then give her a try, but if someone has any help, let me have it. More later.

I’m not a “Windows person”, but I think that you need to use Visual Studio 2008 rather than 2010 to build Audacity.

Steve is right, the Audacity Development Team considers VS2010 too buggy to support at this time. There is a bug in Audacity’s Bugzilla database:
http://bugzilla.audacityteam.org/show_bug.cgi?id=178
but recent discussions on the audacity -devel list serve make it apparent the Audacity Developers do not plan on fixing any of the problems which cause Audacity to fail to compile any time soon.

The last time I tried to compile with VS2010 I found that about 1/2 the errors were in library source code which is not supported (thus not fixed) by the Audacity programmers. Of the errors in the Audacity source, I found 1/2 to be trivial and the rest somewhat disturbing. I reported here and to -devel on 14 July 2010:
https://forum.audacityteam.org/t/cannot-get-audacity-to-compile-with-ms-vc-2010/15020/3

If you have the time, you could post a snippet of just the errors from your build output and I will add them as an update to the Bugzilla bug report.

If you just do the setup.h copy step and get the 5 DLLs which Audacity needs built they will be 32-bit as needed by Audacity. If you get into problems getting wxWidgets built, start here:
https://forum.audacityteam.org/t/solved-trouble-compiling-audacity-from-svn-with-asio/18248/1
then if you still fail, post and I will get you going (I’ve subscribed to this topic so will see any new posts). The wxWidgets DLLs built with VS2010 will not work with Audacity built with VS2008 or VC++2008 Express. VC2008++ Express (and maybe VS2008) may be installed on the same machine as VS2010 but it does lead to some minor hassles as VS2010 wants to be #1 in the automatic “open with” cycle to you need to explicitly set “Open With” to VC++2008 Express for anything you want to double-click on to open (.sln solutions, .cpp source, .h header etc. files).

Well, surprisingly enough, wxWidgets built fine with no errors in VS 2010 targeting x64. I have been unable to build Audacity so far though.What you desribe, Edgar, is basically what I got. 12 fails, 15 succeeds and 4 skips. Is that right? Does that mean 31 projects in the solution? Yeh, that’s right. I was going through the error log when I left to check this thread. I’ll post the log, but the thing is huge so let me see if I can put together a good representative sample without having to post every iteration of the same basic error. It’s funny, when I first signed on here a guy named James sent me an email with:

If you see errors in the instructions, or need to add something about Visual Studio 2010, please do so. It’s a wiki so you can just edit.
There is a lot of information on that wiki. Have a look at:

http://wiki.audacityteam.org/wiki/Category:For_Developers

Now this guy must have had some idea of what he was sending me into, maybe not, but it wouldn’t be the first time I’ve run into “let the new guy find out the hard way”

Edgar, your second post was a little more to my liking as I don’t think I want to reinstall VS 2008 on this machine, for the reasons you stated and because I’d rather find out how to do this thing on 2010, it has to be done eventually. I’m gonna go again based on your second post. Please note: unfortunately, I am re-learning C++ as I do this, I haven’t coded in 10 years, so it’s not just the Audacity issues, it’s me remembering procedures and learning things that have happened since I left. It’s alot, but everytime somebody like you answers one of my stupid questions its a big help and encourages me to keep posting things I know may be stupid knowing that some people still understand that asking questions is the only way to get there.

As noted above wxWidgets compiled with VS(VC++)2010 will not work with Audacity–and most especially, no 64-bit version will work with Audacity. It took me a long time to edit the log down to just the errors!

I suspect this James is a member of the Audacity Development Team and if so he might be seeing things from a long-time programmer pro’s (an long-time Audacity Developer’s) point of view! I also get the feeling that “let the new guy find out the hard way” is endemic to (not just) Audacity’s Development team but after over a year of pestering them with tiny bug fixes I still feel unwelcome.

Again, 2008 is the only supported MS compiler (I think you might be able to use some version of gcc) on Windows. Even if you get 2010 to compile a 32-bit version, there is probably no way the Developers will support the changes until after the 2.0 stable release (which should not be too far off). Part of the problem is in the outside library code which Audacity uses but does not support–you would have to get your corrections approved and committed upstream by the outside libraries’ developers before Audacity would be likely to accept them.

If you look at my post with logs and find that there are new errors showing on your log, please post the additions to that thread as well as that thread is referenced in the bug report.

This is a large sample of the build errors I received on my last attempt. I changed to a win32 target. There is alot here, most of the errors were inabilities to convert var types, seemingly incompatible functions and my neglect to include python and apparently reference wx correctly. I am going into your pointers Edgar and back to the instruction set and try again tonight. It is worth noting that targeting win32 instead of x64 I went from 15 succeeds, 12 fails and 4 skips to 22 succeed, 6 failed and 3 skipped, so there is progress.
Post errors.txt (11.9 KB)

Thank you for the insight into this environment, it may well do me good to step aside and polish my C++ until they are ready to move on. I have looked at other compilers and even downloaded netbeans and was looking at code::blocks as well, but my plate is fairly full as it is. I bought a couple of very nice books on C++ and one “The Audio Programming Book” which starts at novice level. I’ll keep trying here and keep a close eye. I still have the install package for VS 2008 on DVD, so maybe I’ll do that as well just to see it work.

Anyway, thanks for your extensive help and explanation, I’ll keep in touch.

Feel free to ask questions–I am sure I can get you up to speed compiling both wxWidgets and Audacity. As with all things digitally logical there is a very specific sequence to follow and once accomplished you smack your forehead and say “Boy, I really needed to follow ALL those pesky steps exactly!” but success is a great reward.

If you’re just getting back into coding after a 10 year break, I was wondering if you are committed to programming on Windows? I only as because building Audacity on Linux is so simple that even I can do it (most of the time) :stuck_out_tongue:

@ Steve – After installing Linux and using it for the first time last month (at your request) I agree that (after learning the ins-and-outs of package management) the first compile of both wxWidgets and Audacity was a breeze. However, thereafter the lack of an IDE on Linux for Audacity makes life miserable!

@ rpm61 – I looked at your posted errors log and saw your embedded notes. In the future, when creating a log which will be posted, it will be much easier if you limit your compiler (VS2010 or VC++2008 Express) to a single processor and thread thereby keeping everything sequential. As I recall, the really troubling errors are the “ambiguous overload” ones. The “missing” headers are just a problem with incorrectly referenced include/header files.

I am also very leery of the “truncation” problems – they abound in the code; stuff like the imaginary:

int FloatToInt(float pFloat) {
   return (int)pFloat;
}

and

void Something(int pValue) { /*do something*/}
float flt = 0.5;
Something((int)flt);
Something(ROUND(flt));

especially when ROUND and round are #defined numerous times in different ways throughout the code!

Discussion about development platforms split to here: https://forum.audacityteam.org/t/visual-studio-2010-pro-and-linux-ides/18899/1

Well, I gave in and compiled in VS 2008 Express, but I’m still working on getting it done in 2010 (I have 2010 Pro) since I got it down to 4 failures, just too close to stop now. If anyone else is trying to get Audacity compiled in VS 2010, post your experience and we’ll compare notes.

Post (or PM me) a patch for what you have so far and the last 4 errors remaining. I would like to look over the corrections and remaining problems.