Getting linker errors when including JSBSim library #1220
Unanswered
ilyapetrovMO
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I want to learn about JSBSim by using it as a library from a c++ program paired with raylib for visualizations.
I am on windows, and I'm using VS2022.
I've downloaded and installed JSBSim with the provided release executable
JSBSim-1.2.1-1348-setup.exe
, configured my VS2022 project to useAppData\Local\JSBSim\include
andAppData\Local\JSBSim\lib
directories for the headers and their implementations.I have a very basic main file:
I first successfully compiled, linked, and executed the program with code only referencing the raylib library and its cpp wrapper. After that, I've included
FGFDMExec.h
and added the lineauto FDMExec = new JSBSim::FGFDMExec();
to check if the JSBSim library is also configured correctly. This is where I've encountered linker errors:These are the compiler flags VS2022 generates from my project configuration:
These are the linker flags:
I've tried compiling the .lib from source, but no luck. Also checked the paths, and spelling.
I am unable to tell if this is simply a VS2022 project configuration error, or something more involved. Maybe I'm misunderstanding how c++ libraries work or how to include them. I've seen a discussion kind of similar to mine, but it was seemingly resolved, and the person had problems with the self compiled library, and not the distributed version.
If anyone has the time and expertise, I would greatly appreciate it if you could help me understand the cause of this error.
Beta Was this translation helpful? Give feedback.
All reactions