0

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.

Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
  • Try to post the code lines where `#include ` is written. I guess there are problem before that inclusion. Maybe some other includes define `lrint` function. – LPs Mar 14 '16 at 09:22
  • Maybe config.h of autotool could be the problem? That file is generated by configure.ac. Why is it there if you are using VS? – LPs Mar 14 '16 at 11:16

0 Answers0