red0124 / ssp

C++ CSV parser
MIT License
48 stars 4 forks source link

Visual-studio throws some errors related to fast_float when trying to compile a project that uses ssp #51

Open davidelahoz opened 3 months ago

davidelahoz commented 3 months ago

I'm using ssp to read some csv files from a C++ library with python bindings generated by swig. For handling dependencies, I'm using conan 2, but I'm getting some errors related to the use of fast_float inside ssp when trying to compile it. In particular, those errors are:

C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2589: '(': símbolo (token) no válido en el lado derecho de '::'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2589: '(': símbolo (token) no válido en el lado derecho de '::'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2760: error de sintaxis: ">" no se esperaba aquí; se esperaba "statement"
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2760: error de sintaxis: ")" no se esperaba aquí; se esperaba "expresión"
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2760: error de sintaxis: ")" no se esperaba aquí; se esperaba ";"
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C3878: error de sintaxis: token ')' inesperado después de 'expression_statement'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C3878: error de sintaxis: token ')' inesperado después de 'statement_seq'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C2760: error de sintaxis: ")" no se esperaba aquí; se esperaba "}"
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,46): error C3878: error de sintaxis: token ')' inesperado después de 'compound_statement'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,73): error C2760: error de sintaxis: ")" no se esperaba aquí; se esperaba ";"
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\ascii_number.h(518,73): error C3878: error de sintaxis: token ')' inesperado después de 'expression_statement'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\parse_number.h(95,60): error C2589: '(': símbolo (token) no válido en el lado derecho de '::'
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\parse_number.h(95,32): error C2062: tipo 'unknown-
type' inesperado
C:\Users\user\.conan2\p\fast_188d33ba09b25\p\include\fast_float\parse_number.h(95,60): error C2059: error de sintaxis: ')'

I'm sorry for providing those errors in spanish, but I couldn't find how to force msvc to output errors in english. However, if I add fast_float to conanfile.txt apparently I can compile it fine

Is it necessary to define some macro (or to do anything) in order to import ssp correctly on windows?

red0124 commented 3 months ago

No macro defines should be needed for ssp to work on Windows, at least not when using meson or CMake.

As for conan, I have not used it that much. I believe @toge has added ssp to conan so he might be able to answer your question. I will also look into it once I find the time.