I'm trying to build sox from source using Visual Studio 2013 on Windows 8.
I can build the other dependencies but when I try to compile libsndfile I get the following errors:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h(506): error C2059: syntax error : '(' [C:\Users\colinp\Documents\Visual Studio 2013\Projects\sox\sox-14.4.2\sox-14.4.2\msvc10\LibSndFile.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h(584): error C2059: syntax error : '(' [C:\Users\colinp\Documents\Visual Studio 2013\Projects\sox\sox-14.4.2\sox-14.4.2\msvc10\LibSndFile.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h(506): error C2059: syntax error : '(' [C:\Users\colinp\Documents\Visual Studio 2013\Projects\sox\sox-14.4.2\sox-14.4.2\msvc10\LibSndFile.vcxproj]
What am I doing wrong?
EDIT: The relevant line in math.h
:
_CRTIMP long __cdecl lrint(_In_ double _X);
EDIT: This is one example of #include <math.h>
:
#include "sfconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
content of sfconfig.h: https://github.com/erikd/libsndfile/blob/master/src/sfconfig.h
Looking at the libsndfile website and README, it recommends using GCC to compile, so I'm going to try that instead.