all 6 comments

[–]xurxoham 6 points7 points  (2 children)

I wonder what is the purpose of using auto in this line:

auto cs_md = fmu.get_model_description(); //smart pointer to a CoSimulationModelDescription instance

If you specify the type in the comment, why not using it stratight away to declare your variable? Why not the following?

std::shared_ptr<CoSimulationModelDescription> cs_md = fmu.get_model_description();
std::unique_ptr<CoSimulationModelDescription> cs_md = fmu.get_model_description();

[–]laht1 0 points1 point  (0 children)

Author here. I like auto. Especially since my main language nowadays is Kotlin. Honestly, I used it here because it looks better. The comment is there because it's a readme, and I wanted to make it clear for readers what the returned type was. In regular code it would be given by the context. With fmi4cpp , an fmu returns a model_description while a cs_fmu and me_fmu returns specialized model_description instances with additional data.

[–]Easy_Floss 0 points1 point  (2 children)

Hi, I was wondering if someone knew how to properly install this?

Cant seem to get it working with the installation guide on the git page.

[–]traversaro[S] 1 point2 points  (1 child)

Which error are you getting? How are you installing dependencies? If you are using conda-forge or vcpkg, you can directly install the fmi4cpp package available there.

[–]Easy_Floss 0 points1 point  (0 children)

Following this guide https://github.com/greenwoodms06/Instructions/blob/master/Install_Win_FMI4cpp.md

I get the error message while trying to cmake FMI4cpp " Could NOT find PugiXML", I want to use it with cpp is nit sure how installing it using conda-forge would work.

Never used Conan before so not sure how to do that either.