Using JSBSim with CPM.cmake or FetchContent #1263
Closed
0-Seby
started this conversation in
Support requests
Replies: 1 comment 1 reply
-
Since the compiler cannot locate the headers, I'd say you need to add a target_include_directories(tvc PRIVATE path/to/jsbsim/headers) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am new to developing and would like to use JSBSim in a personal project. For that I would like to use the JSBSim c++ API, but I have been running into a few problems.
I managed to write a test program that reads a JSBSim script and runs it successfully, but I am building my program using g++ and specifiying the library file and the header folder manually each time I build it. However, I would like to use CMake with a package manager (like CPM) to manage my dependencies, and simplify the build process. Unfortunately, I do not completely understand what I am doing, so I am getting many linking errors, which I have not been able to solve through reading documentation and youtube tutorials.
My CMakeLists.txt looks like this:
My test.cpp looks like this:
The command i used to build my program successfully using g++ is:
The error i get when building using
cmake --build
I would be very greatful if somebody could explain the errors I am getting, and how to fix them. If my approach is wrong, I would also appreciate some insight on how to do it correctly.
Thank you for your time,
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions