Coder Social home page Coder Social logo

Comments (4)

eao197 avatar eao197 commented on August 30, 2024

Hi!

Which version of VC++ do you use?

from json_dto.

itfintech avatar itfintech commented on August 30, 2024

vs 2015
image

from json_dto.

eao197 avatar eao197 commented on August 30, 2024

Can you run cl -? from the command prompt?

I've checked the following code:

#include <vector>

#include <json_dto/pub.hpp>

struct data_t
{
	std::string m_a;
	int m_b;

	template<typename I>
	void json_io(I & io)
	{
		io & json_dto::mandatory("a", m_a)
			& json_dto::mandatory("b", m_b);
	}
};

int main() {
	std::vector< data_t > e1{ { "a", 0 },{ "b", 1 },{ "c", 3 } };

	//const std::string json_data = json_dto::to_json(e1);

	std::string txt = R"JSON([{"a":"a","b":0},{"a":"b","b":1},{"a":"c","b":3}])JSON";
	auto e2 = json_dto::from_json< std::vector<data_t> >(txt);

	std::cout << "Sorted data: " << txt << std::endl;
}

with this version of VC++: Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27032.1 for x64
It works as expected.

from json_dto.

itfintech avatar itfintech commented on August 30, 2024

'cl' is not recognized as an internal or external command, operable program or batch file.
I'm a VS fun, just tried in 2017 with MS Build tool v141, and works.
Thx for help...
Looks like in the Prerequisites from documentation refer to different VC++15.0 != VS 2015
C++14 compiler (VC++15.0, GCC 5.4 or above, clang 4.0 or above)

from json_dto.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.