You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting! Does the rest of the code compile? I am asking, because I do not want to add changes, before knowing that MinGW can work in principle. Furthermore, what version of MinGW and compiler do you use?
bash-3.1$ g++.exe --version
g++.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i am compile with -std=c++11 option
and i have another some errors with MinGW
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp: In member function 'nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::string_t nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::dump(bool, unsigned int, unsigned int) const':
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2015:24: error: 'to_string' is not a member of 'std'
return std::to_string(m_value.number_integer);
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2022:59: error: 'snprintf' is not a member of 'std'
const auto sz = static_cast(std::snprintf(nullptr, 0, "%.15g", m_value.number_float));
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2022:59: note: suggested alternative:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cstdio:42:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:33,
from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:
c:\mingw\include\stdio.h:330:29: note: 'snprintf'
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
^
In file included from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:0:
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2024:17: error: 'snprintf' is not a member of 'std'
std::snprintf(&buf[0], buf.size(), "%.15g", m_value.number_float);
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2024:17: note: suggested alternative:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cstdio:42:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:33,
from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:
c:\mingw\include\stdio.h:330:29: note: 'snprintf'
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
^
In file included from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:0:
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp: In member function 'void nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::lexer::yyfill()':
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4123:19: error: 'ssize_t' does not name a type
const ssize_t offset_start = m_start - m_content;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4124:19: error: 'ssize_t' does not name a type
const ssize_t offset_marker = m_marker - m_start;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4125:19: error: 'ssize_t' does not name a type
const ssize_t offset_cursor = m_cursor - m_start;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4127:51: error: 'offset_start' was not declared in this scope
m_buffer.erase(0, static_cast<size_t>(offset_start));
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4134:34: error: 'offset_marker' was not declared in this scope
m_marker = m_start + offset_marker;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4135:34: error: 'offset_cursor' was not declared in this scope
m_cursor = m_start + offset_cursor;
^
Thank's for your quick answer :)
Activity
nlohmann commentedon Jun 3, 2015
Thanks for reporting! Does the rest of the code compile? I am asking, because I do not want to add changes, before knowing that MinGW can work in principle. Furthermore, what version of MinGW and compiler do you use?
Ingener74 commentedon Jun 3, 2015
bash-3.1$ g++.exe --version
g++.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i am compile with -std=c++11 option
and i have another some errors with MinGW
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp: In member function 'nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::string_t nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::dump(bool, unsigned int, unsigned int) const':
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2015:24: error: 'to_string' is not a member of 'std'
return std::to_string(m_value.number_integer);
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2022:59: error: 'snprintf' is not a member of 'std'
const auto sz = static_cast(std::snprintf(nullptr, 0, "%.15g", m_value.number_float));
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2022:59: note: suggested alternative:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cstdio:42:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:33,
from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:
c:\mingw\include\stdio.h:330:29: note: 'snprintf'
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
^
In file included from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:0:
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2024:17: error: 'snprintf' is not a member of 'std'
std::snprintf(&buf[0], buf.size(), "%.15g", m_value.number_float);
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:2024:17: note: suggested alternative:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cstdio:42:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:39,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:33,
from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:
c:\mingw\include\stdio.h:330:29: note: 'snprintf'
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
^
In file included from c:/Users/Pavel/workspace/Jupiter/modules/Jupiter/src/ComplexShape.cpp:10:0:
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp: In member function 'void nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator>::lexer::yyfill()':
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4123:19: error: 'ssize_t' does not name a type
const ssize_t offset_start = m_start - m_content;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4124:19: error: 'ssize_t' does not name a type
const ssize_t offset_marker = m_marker - m_start;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4125:19: error: 'ssize_t' does not name a type
const ssize_t offset_cursor = m_cursor - m_start;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4127:51: error: 'offset_start' was not declared in this scope
m_buffer.erase(0, static_cast<size_t>(offset_start));
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4134:34: error: 'offset_marker' was not declared in this scope
m_marker = m_start + offset_marker;
^
c:/Users/Pavel/workspace/Jupiter/3rdparty/json/src/json.hpp:4135:34: error: 'offset_cursor' was not declared in this scope
m_cursor = m_start + offset_cursor;
^
Thank's for your quick answer :)
fixed MinGW compilation (#81 and #80)
nlohmann commentedon Jun 4, 2015
Could you please try whether it works now?
Ingener74 commentedon Jun 4, 2015
Ok. Thank's. I'll try at home a couple of hours.
nlohmann commentedon Jun 4, 2015
I could compile it with
i586-mingw32-g++ (GCC) 4.8.0for OS X (from http://crossgcc.rts-software.org/doku.php?id=compiling_for_win32).Ingener74 commentedon Jun 4, 2015
i try and get error
Ingener74 commentedon Jun 4, 2015
if delete
compiles and works fine
fixed float serialization (#81 and #80)
nlohmann commentedon Jun 4, 2015
I adjusted the code in the last commit. I should compile now with MinGW.
Merge pull request #1 from nlohmann/master
Ingener74 commentedon Jun 4, 2015
Thank you. It helped :)
Revision 1 jk (nlohmann#80)