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
json 3.9.1 + MinGW 10.3.0 + Clang 12.0.0 x86
Link error on build test example with "--static" flag when use dump() method:
warning: failed to compute relocation: IMAGE_REL_I386_REL32, Invalid data was encountered while parsing the file
lld-link: error: duplicate symbol: std::type_info::operator==(std::type_info const&) const
>>> defined at C:/tools/msys64/mingw32/include/c++/10.3.0/typeinfo:121
>>> objects.a(main.cpp.obj)
>>> defined at libstdc++.a(tinfo.o)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
without the "--static" flag, the build finishes successfully.
Can you provide a small but working code example?
#include "nlohmann/json.hpp"
using json = nlohmann::json;
int main()
{
json j;
j["pi"] = 3.141;
std::string s = j.dump(2);
}
If comment string with j.dump(), build is ok.
The text was updated successfully, but these errors were encountered:
json 3.9.1 + MinGW 10.3.0 + Clang 12.0.0 x86
Link error on build test example with "--static" flag when use dump() method:
without the "--static" flag, the build finishes successfully.
Can you provide a small but working code example?
If comment string with j.dump(), build is ok.
The text was updated successfully, but these errors were encountered: