Discussion:
[Audacity-devel] Use of #ifdef WIN32 in sound.h and compile-time warnings
Witold Waldman
2017-06-06 10:52:33 UTC
Permalink
I have been trying to compile Audacity with Visual Studio. In the sound.h
file, at around line 460, the following #ifdef exists:



#ifdef WIN32

double log2(double x);

#endif /* WIN32 */



When I do a clean build/rebuild, this generates a very large number of
compile-time warnings. They typically look like the following:



6>.\documents\github\audacity\lib-src\libnyquist\nyquist\nyqsrc\sound.h(461)
: warning C4273: 'log2' : inconsistent dll linkage

6> c:\program files (x86)\microsoft visual studio
12.0\vc\include\math.h(504) : see previous definition of 'log2'



The log2() function is defined in the math.h file, and appears to come as
standard, irrespective of whether or not the WIN32 target option is chosen.



Is the #ifdef WIN32 block shown above really required? Could it just be
deleted, thus silencing a lot of somewhat distracting compile-time warnings?
Loading...