NTNU-IHB / FMI4cpp

FMI 2.0 implementation written in modern C++.
MIT License
96 stars 36 forks source link

Response from remote is not json #143

Closed Number-One-Intern closed 3 months ago

Number-One-Intern commented 3 months ago

Hi, I'm currently trying to build FMI4cpp with conan. But whenever I attempt to I get this error in the terminal:

"Response from remote is not json, but 'text/html; charset=utf-8'. [Remote: ais]"

And based off installation.md I do not have the wrong url.

"conan remote list ais: https://ais.jfrog.io/artifactory/api/conan/ais-conan-local [Verify SSL: False] conancenter: https://center.conan.io [Verify SSL: False]"

For reference I'm currently trying to use conan 1.6, and operating through a container in WSL.

markaren commented 3 months ago

Hi, try https://github.com/NTNU-IHB/FMI4cpp/pull/139

Number-One-Intern commented 3 months ago

I was able to clone #139 run, "sudo apt-get install libzip-dev libpugixml-dev", and then able to configure and build. I have one last question though. I am quite familiar with FMPy, but this is my first time interacting with FMI4cpp are there any special steps I have to take to run the examples?

markaren commented 3 months ago

You need to pass -DFMI4CPP_BUILD_EXAMPLES=ON to CMake if you have not already.

Number-One-Intern commented 3 months ago

Ok, thank you for your help it has been very useful. I ran that command to cmake and got no errors as well as

'-DFMI4CPP_BUILD_TESTS=ON.'

But this is my actual last question. I am trying to run fmu_test.cpp through VS Code. But is there something else I am missing to run it? Because I tried using run and debug with gcc and ended up with an include error for,

'#include <fmi4cpp/fmi4cpp.hpp>' that said 'No such file or directory'

Which I assume shouldn't be an issue since everything built correctly.

markaren commented 3 months ago

It might be that you are trying to run a .cpp file and not an actual CMake target. Check if there are executables in your build folder that you can invoke from the terminal. If they work you are good. And since you built the code, it should be ok.

Number-One-Intern commented 3 months ago

image There doesn't seem to be any executables in the build folder despite having no build issues.

markaren commented 3 months ago

Check the out or examples folder.

Number-One-Intern commented 3 months ago

Screenshot 2024-06-28 120211 Screenshot 2024-06-28 120335 I was still unable to find any.

markaren commented 3 months ago

Check the .dir files or observe the output from CMake to find the location. Anyhow, note that this has to do with how CMake is invoked, not fmi4cpp by itself.

Number-One-Intern commented 3 months ago

These are my terminal outputs. image Screenshot 2024-06-28 121335 Screenshot 2024-06-28 121315 image

The files are being written to FMI4cpp itself but I do not see them in the directory. The same for out/build/configure. This is also what one of the insides of the .dir files looks like. image

markaren commented 3 months ago

Check the CI workflow for how CMake ought to be invoked. Btw, I think you are missing the build step.

Number-One-Intern commented 3 months ago

Sorry, I am unsure what the CI workflow is. But I edited the comment to include the build terminal image as well. Unless I have mistaken that output for the build step completing.

markaren commented 3 months ago

https://github.com/NTNU-IHB/FMI4cpp/blob/vcpkg/.github/workflows/config.yml

Number-One-Intern commented 3 months ago

Thank for you help. I was able to run the tests with no problems and run the test_fmu.