I recently downloaded Audacity from the Zip file.(audacity master). I downloaded wxWidgets-3.0.2, was able to compile wx with DLL-Release and DLL-Debug
after making some changes to some src stuff in wxWidgets. Primarily - there was this recurring error - C1189 - snprintf conflicts with standard
Library function wxtiff (conflict line 1927 in stdio.h) I also did two other changes… but more or that later.
I was able to compile wxWidgets after this - but then, tried to compile Audacity after setting Environment Variable WXWIN. I keep getting a problem in the libsndfile library.
C1189 - #error Macro definition on snprintf conflicts with Standard libsndfile library function declaration.
Same error - same line in stdio.h (Line 1927).
Does anyone have experience with this problem? Seems like I cant compile one or the other with this set this way…
Any ideas would be greatly appreciated. I have compiled Audacity before in Windows, and each time it seems like there are certain things that have to be set for it to work…
No-one has compiled Audacity on Windows 10 yet, as far as I know.
What version of Visual Studio are you using? Audacity only supports VS2013. If you are using VS2015, I assume the Widgets error you ran into is as described and fixed here: https://forums.wxwidgets.org/viewtopic.php?p=163676#p163676.
I am not a programmer, but if you are using VS2015 I suspect you are running into similar issues compiling Audacity, because older VS did not support snprintf(), and as a result many libraries used the snprintf() function by defining it as _snprintf(). But this will fail in VS2015 given VS2015 defines snprintf().
If this is the problem, see
http://stackoverflow.com/questions/27754492/vs-2015-compiling-cocos2d-x-3-3-error-fatal-error-c1189-error-macro-definiti?answertab=votes#tab-top for explanation. You would have to make similar changes to libsndfile that you made in wxWidgets, so that compilation does not fail on #define snprintf _snprintf.
Try VS 2013 if you are not already doing so, or in VS2015, rather than messing with lots of defines, you could try changing the platform toolset on all projects to Visual Studio 2013 (v120).
I can’t help you with the details because I’ve never compiled Audacity, but I’ve done some programming over the years…
I have compiled Audacity before in Windows, and each time it seems like there are certain things that have to be set for it to work…
That’s how it is with compilers/IDEs. Whenever I’m using a new programming environment, my goal for the first day is to get the compiler installed & configured and get “Hello World” complied (and running). There are usually some “issues” to resolve and if I can get it working in the first day, or first half-day, I’m happy.
The ONLY time I can remember things going super-smoothly was with the Arduino IDE. It might have taken me 15 minutes to download the IDE, install it, read the instructions, and get “Blink LED” working. …Well, I don’t remember having any trouble with BASIC on the Commodore or the original IBM PC, which had it built-in and you didn’t have to install or configure it… But those early BASIC languages didn’t have to be compiled, they were “interpreted” in real-time.
Thanks Gale et al,
Yes - I did download VS2015 - did the specific changes, although didn’t do all of them…
But the other link you posted was very informative… I realized later that it was that MACRO definition that was making my compiles fail.
I will probably try VS2013 - since there are a number of libraries I will need…and that version (VS2013) is supposed to work for current Audacity… I unfortunately missed that when I started this process…