• ORBITER-FORUM will be temporarily closed at 2026-07-23 18:00 UTC while we complete some OF maintenance tasks. The amount of downtime is expected to take up to one hour, but probably less.

Problem VC++2010 Express can't find orbitersdk.h

Zatnikitelman

Addon Developer
Addon Developer
Joined
Jan 13, 2008
Messages
2,303
Reaction score
6
Points
38
Location
Atlanta, GA, USA, North America
I've made the jump to VC++2010, and I'm having a real issue with my first project on it. I'm trying to make a project as part of a solution. Previously, I've used separate solutions for all my development work, but I'm trying this to hopefully make my dev work on separate components more efficient.
I've setup two projects identical to each other except for their names, however, in the second project, I get the following error:
Code:
1>c:\orbiter\orbiter10\dev\trusssystem\code\orbitertrusssystem\pallet\pallet.h(2): fatal error C1083: Cannot open include file: 'orbitersdk.h': No such file or directory
I do however, see orbitersdk.h in the external dependencies dropdown of this second project, and each project's properties are identical (include, library, directories, etc.).
I'm not exactly sure at this point what else to post to aid in diagnosing this.
Thanks for any help,
Matt
 
I just put my source files into a folder in the "samples" directory. Might be a bit confusing at first but it saves you the headache of getting the files loaded properly.
 
What is the exact path to the Orbiter folder and what do you have in the include directories list ? I have noticed that the include directories are sometimes specified with macros like $OrbiterSDKDir or something similar and they point to somewhere in C:, which may not be where you have installed Orbiter.
 
What is the exact path to the Orbiter folder and what do you have in the include directories list ? I have noticed that the include directories are sometimes specified with macros like $OrbiterSDKDir or something similar and they point to somewhere in C:, which may not be where you have installed Orbiter.
This is how it is in the failing project's linker properties:
Code:
C:\Orbiter\Orbiter10\orbiter100606\Orbitersdk\include
This is how it is in the succeeding project's linker properties:
Code:
C:\Orbiter\Orbiter10\orbiter100606\Orbitersdk\include
And this is the location of a file in the include directory:
Code:
C:\Orbiter\Orbiter10\orbiter100606\Orbitersdk\include
 
ok you said linker properties. The include directory should be specified in the Additional Include Directories box in C/C++ options. The search for headers occurs during the compiling phase much before linking.
 
If you haven't already, watch this tutorial:


For some reason, you have to enter the same path about three times it seems in VS 2010, in as many different places.

I just had exactly the same error (also learning VS 2010 here) and that was the problem, if I remember correctly.
 
Code:
1>c:\orbiter\orbiter10\dev\trusssystem\code\orbitertrusssystem\pallet\pallet.h(2): fatal error C1083: Cannot open include file: 'orbitersdk.h': No such file or directory

Your include path needs to include <orbiter>/Orbitersdk/include. Because it apparently doesn't. In the same way, check that your library path includes <orbiter>/Orbitersdk/lib before you hit linker errors (they're a PITA).

I heartily recommend using property sheets to make life easier. I have one in XRRR's repository that just specifies where my Orbiter install is located, and it provides me with the $OrbiterDir macro like a few of the samples have. It's really helpful, especially for mobile projects.
 
For some reason, you have to enter the same path about three times it seems in VS 2010, in as many different places.
You don't have to do this at all. You can use Orbiter property sheets instead, and generally all you do for new projects is just changing output file type from .exe to .dll.
 
You don't have to do this at all. You can use Orbiter property sheets instead, and generally all you do for new projects is just changing output file type from .exe to .dll.

I'm just learning VS 2010, but I figured there must be some way to set up a template instead of manually inputting all the values each time. I just haven't seen how to do it yet. (I literally just got an orbiter dll to compile properly yesterday, but when I saw Zatnikitelman was having one of the same problems I was having I wanted to point him at the walkthrough that helped me figure things out.)

So a VS 2010 template is called a property sheet? I'll be looking up how to do that next then. Thanks!
 
So a VS 2010 template is called a property sheet? I'll be looking up how to do that next then. Thanks!
Orbiter 2010+ contains project property sheets defined in "OrbiterSDK/resources" folder, that can be used to create vessels or plug-ins. However, you need to convert them first to VS2010 format to be able to use them in your project, as they are in format recognizable only by earlier projects (VS2005 / VS2008). To do so, you need to open an existing vessel sample and plug-in sample to convert their projects and by the way these property sheets.

It's good to edit the "orbiterroot.vsprops" (VS2005 format) before that, to not repeat the same thing twice later in "orbiterroot.vsprops" and "orbiterrrot.props" (VS2010 format), which can be regenerated from the "orbiterroot.vsprops" again, when you open another, yet unconverted project which uses them, and by the way with resetting your OrbiterDir macro to the state from "orbiterroot.vsprops".

You can find more about using these property sheets and how to setup them, by searching either in forums or blogs on Orbiter-Forum (I talk about them quite often :lol:).
 
Sorry it's taken so long for me to respond as I've had other obligations.
You're right, I said linker, but I do indeed have the include directory specified in the Additional Include Directories section under C++ in the project properties.
I've setup several dozen Orbiter projects before (though only in VS2008) and I can get the first project in this solution to compile, it is only this second project that doesn't compile.
 
Ok as I understand it then, you are unable to compile any project in VS2010. Have you tried converting an old Orbiter 2005 project(that comes with the default install) into VS2010. They should be upgraded when opened, after you confirm. Does such a project compile? Maybe you can try to upgrade shuttlePB, one of the simplest projects.
 
Ok as I understand it then, you are unable to compile any project in VS2010. Have you tried converting an old Orbiter 2005 project(that comes with the default install) into VS2010. They should be upgraded when opened, after you confirm. Does such a project compile? Maybe you can try to upgrade shuttlePB, one of the simplest projects.
You understand it wrong, I can compile an individual project just fine, but only when it's the sole or first project in a solution.
 
Back
Top