Linker Issues with Orbiter Sound [solved]

Adrian

New member
Joined
Jan 27, 2025
Messages
18
Reaction score
3
Points
3
Location
Germany
Hello everyone,

I am pretty new to Orbiter Developement, but I already inherited a pretty big project. The first goal for me is to compile the addon that has been written for Orbiter 2010 with the 2016 SDK. I am working with Visual Studio 2019 because the project has a lot of files that all depend on each other somehow.
After a lot of trial and error and many questions to ChatGPT, I am now down to what I think are the last linker issues. But I really can´t figure it out:

1741290763034.png

You can see the error message here. It seems like OrbiterSoundSDK50.lib has been compiled with a static runtime library while the addon is compiled with a dynamic runtime library, which makes them incompatible. However, I can see in the compiler options, that everything has been compiled with a dynamic runtime library for orbiter 2010. And when I try to compile projects by other people, I get the same issue.

Now I thought it might be an issue with OrbiterSound5, so I tried compiling with OrbiterSound4, which produced this issue:
1741291193560.png

ChatGPT says this error probably has the same underlying reason.

I tried everything I could think of, and nothing worked, so I am really stumped here. Does anyone of you have an idea what I need to do to fix this?

Thank you!
Adrian
 
Well, solution is fairly obvious, compile with a static runtime library. 😅

It seems like most Orbiter Addons are done this way, and I don´t know how else you could make it compatible with Orbiter Sound 5. It wasn´t that straight forward in my case though. Compiling statically was still throwing out the same errors. Turns out the reason was that it was still referencing a dynamic library somewhere that I didn´t know about. Welp, only took me 4 hours over multiple days to figure out... Sometimes programming can be really annoying😂
 
Tell me about it. Ran into the same thing myself. Compared to say a python project, doing anything for Orbiter still gives me anxiety.
 
Tell me about it. Ran into the same thing myself. Compared to say a python project, doing anything for Orbiter still gives me anxiety.

Just try maintaining a Python project with more than 5000 lines of code. Luckily Orbiter picked Lua there. If you have no experience with C++, its generally better to use generic vessel modules like Spacecraft.dll or LuaVessel. Orbiter is a very safe environment to learn C++ though, but better stick to the examples in the SDK first, not try messing with older add-ons, often with abandoned dependencies.

As always with any programming language that does not assume that the developer is a clueless beginner: With C++, you can easily shoot into your own foot and it just costs you the whole leg. Same for C99 or assembly language. They let you do everything, assuming you know what you are doing. Rust, Go, Java, C# and others instead assume that you are intoxicated or a child and will treat you like that: They talk gently and carefully too you, push you in the right direction and remove all dangerous objects near you.
 
Just try maintaining a Python project with more than 5000 lines of code. Luckily Orbiter picked Lua there. If you have no experience with C++, its generally better to use generic vessel modules like Spacecraft.dll or LuaVessel. Orbiter is a very safe environment to learn C++ though, but better stick to the examples in the SDK first, not try messing with older add-ons, often with abandoned dependencies.

As always with any programming language that does not assume that the developer is a clueless beginner: With C++, you can easily shoot into your own foot and it just costs you the whole leg. Same for C99 or assembly language. They let you do everything, assuming you know what you are doing. Rust, Go, Java, C# and others instead assume that you are intoxicated or a child and will treat you like that: They talk gently and carefully too you, push you in the right direction and remove all dangerous objects near you.
Believe me I would love to simply use Spacecraft.dll
But as a student assistant maintaining an older addon with thousands of lines of code and abandoned dependencies is unfortunately my job😬

And even worse, I am a clueless beginner. Just getting everything to compile for Orbiter 2016 took days, and this is just the start of it.
I hope integrating vesselM will make my job a bit easier😅
 
Believe me I would love to simply use Spacecraft.dll
But as a student assistant maintaining an older addon with thousands of lines of code and abandoned dependencies is unfortunately my job😬

And even worse, I am a clueless beginner. Just getting everything to compile for Orbiter 2016 took days, and this is just the start of it.
I hope integrating vesselM will make my job a bit easier😅

Just ask around here, somebody is always able to help you. :) The real problem of the old add-ons is, that they are mostly made with older versions of Microsoft C++ and have not been updated in a while, despite the big changes in the Microsoft run-time library. Without asking real people, you will likely be lost in development hell.

And yeah, Hiwis (research assistants) are cannonfodder. Be lucky that its maintaining Orbiter add-ons and not running errands for a PhD. :ROFLMAO:
 
Back
Top