Problem Compiler can't find orbitersdk.h

zachary77

New member
Joined
Aug 31, 2017
Messages
80
Reaction score
1
Points
0
Hi, I'm new to C++ and the SDK in general. When I attempt to compile my vessel code (using Visual Studio 2017 Community on Win 10) into a .dll I get this error:
Code:
Cannot open include file: 'Orbitersdk.h': No such file or directory

I have added the relevant header to the "Headers" folder but no joy. Any help would be appreciated.

Thanks,
zachary77
 
When I attempt to compile my vessel code (using Visual Studio 2017 Community on Win 10) into a .dll I get this error:
Code:
Cannot open include file: 'Orbitersdk.h': No such file or directory

I have added the relevant header to the "Headers" folder but no joy. Any help would be appreciated.

My guess would be that you forgot to setup the orbiterroot.vsprop in the /orbitersdk/resources/ folder. There you have to enter the proper path to your installation root directory. The SDK samples rely on that path.

I'm not sure if VS2017 Community can use them properly, though. If it doesn't work, I can offer VS2015-converted property sheets (*.props instead of *.vsprops).
 
My guess would be that you forgot to setup the orbiterroot.vsprop in the /orbitersdk/resources/ folder. There you have to enter the proper path to your installation root directory. The SDK samples rely on that path.

I'm not sure if VS2017 Community can use them properly, though. If it doesn't work, I can offer VS2015-converted property sheets (*.props instead of *.vsprops).

Thanks for the reply. Could you please give a walkthrough on this? I'm very much a novice, so I don't understand property sheets are or how to use them.

Thanks,
zachary77
 
Hi!

It took me a long time to understand how to set the configuration of Visual Studio for a new project, so here I list the step I followed and that worked for Visual Studio 2015. Hope it can help:

The first step on the creation of a new module is to set the configuration for the project. The actions will depend on the Visual Studio version, so the following statements work for Visual Studio 2015:
- On orbiterroot project property file, OrbiterSDK/resources/orbiterroot, change OrbiterDir to your current Orbiter main folder.
- Open the solution for a vessel and a plugin module at Visual Studio (i.e. Flight Data and Atlantis).
- Click New/Project/Win32Project and set the destination project folder in OrbiterSDK/samples. Select .dll and empty project before finishing.
- Create a new .cpp and .h element to the project. The project must include the definition for a new Orbiter module and the Orbitersdk.h library.
- Add orbiter.lib and Orbitersdk.lib to resource files. Those are located on OrbiterSDK/samples/lib.
- For debugging, add Orbiter debug property sheet and Orbiter plugin or/and Orbiter vessel.
- Before compiling, go to project properties, change to multiprocess (/MT) in C++/Code Generator and set Linker/Output file to $(ModuleDir)\Plugin\$(ProjectName).dll.
For previous Visual Studio versions, see the configuration explanation on the following link:
.
 
Thanks laura,
shouldn't this be added to the wiki?
 
Back
Top