I try to compile some code with visual studio 2019. I'm able to compile it with this command in the command prompt of Windows 10 and execute it successfully:
g++ RunClient.cpp UserInput.cpp Client.cpp -std=c++11 -pthread -lwsock32 -lWs2_32
but it gets errors when I try to build and run my project in visual studio as a c++ console app. I use a header-only library for JSON parsing. these are the errors:
Error (active) E0135 class "nlohmann::basic_json<std::map, std::vector,
std::string, bool, int64_t, uint64_t, double, std::allocator,
nlohmann::adl_serializer>" has no member "swap"
Error (active) E0135 class "nlohmann::basic_json<std::map, std::vector,
std::string, bool, int64_t, uint64_t, double, std::allocator,
nlohmann::adl_serializer>" has no member "parse"
also, there is a link error:
Error LNK1104 cannot open file 'opencv_calib3d300d.lib'
How can I solve this problem? I searched a lot but I did't find any solution.
Aucun commentaire:
Enregistrer un commentaire