SDK Question Visual Studio Community setup

bimmo

orbiting since 2000
Joined
Jul 8, 2009
Messages
12
Reaction score
0
Points
1
Hi, I'm trying to recompile the standard DeltaGlider from the Orbitersdk\samples folder (trying to experiment with different parameter and variable values).

I've tried both in Visual Studio Express 2015 and in Visual Studio Community. When opening the .sln file in either of these programs, and trying to build either the solution or only the DeltaGlider, I continue to get the error:
The system cannot find the path specified.

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 255.

I've followed numerous tutorials (although several years old) on how to configure the project's properties and paths and so on, but still no luck.

Has anyone succeeded in rebuilding the standard Deltaglider or any other standard vessels, using Visual Studio, and if so, could you please enlighten me about what input or changes were required to make that work? Or please point me to a working tutorial about this that uses a current version of visual studio? Thanks!!!
 
Has anyone succeeded in rebuilding the standard Deltaglider or any other standard vessels, using Visual Studio, and if so, could you please enlighten me about what input or changes were required to make that work?

I did so numerous times with VS2008. The only thing I had to do was update the property sheets that come with Orbiter to point to the proper folder.

I also tried compiling the Atlantis code with VS2015 once, and there I also only had to change the sheets path. I don´t think that I ever tried it with the DG in 2015, though, nor with any one of the free versions of VS.
 
Remember you need to download and install a Windows SDK for compiling Orbiter Add-ons. Otherwise, no problems encountered yet here.
 
The only thing I had to do was update the property sheets that come with Orbiter to point to the proper folder

Ah, while we're talking about that,
attached one can find my "Visual Studio 2005++"[1] property sheets.
I've had quite a good experience with 'em, because I managed to setup the orbiterroot.props sheet with a relative path to $OrbiterDir.
This eliminates the need to change that property over and over again each time I created another working copy of Orbiter anywhere on my hard-drive.

Would be nice if one of you (Face?) could try these and test if they work for you too...
Regards,
Kuddel

[1] They might work from VS2003, but never tested that though.
 

Attachments

Last edited:
thanks that makes sense I will try finding windows 10 sdk, download, install and report back

---------- Post added at 03:51 PM ---------- Previous post was at 02:36 PM ----------

Maybe I have the issue because I'm using the free visual studio version... I have the correct path to Orbiter in all the applicable resources\.*props files, I downloaded the windows 10 sdk, but still same error:

Severity Code Description Project File Line Suppression State
Error MSB6006 "cmd.exe" exited with code 255. DeltaGlider C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171
 
The free version of Visual Studio is just fine (Visual Studio Community as it's called now).

For running / debugging the compiled DLL with the IDE you must set the according parameters in the Project settings however (and have a running Orbiter installation of cause).
Let me see if I can get you more information on that (if needed)

---------- Post added at 23:09 ---------- Previous post was at 23:04 ----------

For running/debugging with Orbiter_NG.exe (to use D3D9Client):
set
"Command" to "$(ModuleDir)\Server\orbiter.exe" and
"Working Directory" to "$(OrbiterDir)"

For running/debugging with regular Orbiter.exe (to use inline graphic client):
set
"Command" to "$(OrbiterDir)\orbiter.exe" and
"Working Directory" to "$(OrbiterDir)"
 
thanks that makes sense I will try finding windows 10 sdk, download, install and report back

---------- Post added at 03:51 PM ---------- Previous post was at 02:36 PM ----------

Maybe I have the issue because I'm using the free visual studio version... I have the correct path to Orbiter in all the applicable resources\.*props files, I downloaded the windows 10 sdk, but still same error:

Severity Code Description Project File Line Suppression State
Error MSB6006 "cmd.exe" exited with code 255. DeltaGlider C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171
Could you check that you're not compiling in Debug mode? The left-most drop down menu should be Release, not any of the debug modes: https://www.dropbox.com/s/nh59hkx3bllrgaz/VScommunity_Release.jpg?dl=0
 
...but that might not be your problem.
A quick search for "Error MSB6006" delivered this:
https://stackoverflow.com/questions/13118947/error-msb6006-cmd-exe-exited-with-code-1
In the DeltaGlider project there might be a custom build step...

Yes there are: some "meshres" operations like
Code:
"echo $(InputPath) - meshres.h | $(SDKDir)\utils\meshc.exe"

I have never tried to build DeltaGlider, so there might be one little extra thing you have to do or tweak ;)
 
Last edited:
Lots of intellisense errors in that picture. Suggests there's something else wrong with your setup. Could you check what $(OrbiterDir) is actually set to? You can do that by going to view->other windows->property manager, then in the property manager (it's on the left for me) you need to open up DeltaGlider->Release|Win32->Orbiter vessel->Orbiter, double click orbiterroot and then click User Macros in the window that appears.
 
solved - thank you!

ok so that was definitely the problem!

https://drive.google.com/file/d/0B42xTKwxj2QVcGh3SnlFVU5ULU0/view?usp=sharing

Thanks so much for the detailed instructions jangofett287!

I now have a successfully built Deltaglider for Orbiter 2016 with custom values using Visual Studio Community 2017 and the Windows 10 SDK.

https://drive.google.com/file/d/0B42xTKwxj2QVd3FvSFNQdnpOMGs/view?usp=sharing

https://drive.google.com/file/d/0B42xTKwxj2QVQmpzQXozVlNFRTA/view?usp=sharing

:thumbup:
 
Remember you need to download and install a Windows SDK for compiling Orbiter Add-ons.

I thought Windows SDKs were included in visual studio downloads since 2013, but I'm not 100% sure.
 
I thought Windows SDKs were included in visual studio downloads since 2013, but I'm not 100% sure.

Not for community, you have to choose and download the SDK of your choice first. But still for free.
 
Not for community, you have to choose and download the SDK of your choice first. But still for free.

Since at least 2015 installing VC++ support also installs all the Windows development stuff (Win32 that is, not UWP) by default unless you expressly uncheck the box for it. The box for VC++ overall is not checked by default though.
 
Ah, while we're talking about that,
attached one can find my "Visual Studio 2005++"[1] property sheets.
I've had quite a good experience with 'em, because I managed to setup the orbiterroot.props sheet with a relative path to $OrbiterDir.
This eliminates the need to change that property over and over again each time I created another working copy of Orbiter anywhere on my hard-drive.

Hi Kuddel,

neat trick with the relative path for OrbiterDir using the MSBuildThisFileDirectory macro (I hadn't come across that particular macro before). :thumbup:

With your permission, I'd like to adopt that method for my own orbiterroot property sheet. Not having to set up the path manually would be a huge advantage and avoid a common cause of problems, as this thread shows.
 
With your permission, I'd like to adopt that method for my own orbiterroot property sheet. Not having to set up the path manually would be a huge advantage and avoid a common cause of problems, as this thread shows.
I would be an honor :thumbup:

I also took me quite long before I came across that macro.
Sometimes the hardest thing is: What exactly do I have to ask google to get a satisfying answer.
 
Quick update: the MSBuildThisFileDirectory macro doesn't seem to be supported in VS2008 (and probably before). So I'll have to stick to the current method of manually specifying the OrbiterDir location in the default property sheets, at least until I'm upgrading my compiler tool chain.
 
Quick update: the MSBuildThisFileDirectory macro doesn't seem to be supported in VS2008 (and probably before).
That's a pity.

But it's always that case. The urgently needed feature is in version N+1 :P

For whom it might interest:
 
Hello,

I think I'm having a similar problem, but the above solutions didn't work. I am trying to compile the DeltaGlider source code in Visual Studio 2017, but I keep getting the following two errors:

Error MSB6006 "cmd.exe" exited with code 255. DeltaGlider C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Mic rosoft.CppCommon.targets 209

and

Error MSB3073 The command "if not exist D:\Files\Applications\Orbiter 2016\Project Apollo Debug\Modules\Startup mkdir D:\Files\Applications\Orbiter 2016\Project Apollo Debug\Modules\Startup
:VCEnd" exited with code 3. DGConfigurator C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Mic rosoft.CppCommon.targets 128



(Ignore the "Project Apollo Debug" part, that's just the name I gave to this particular Orbiter installation.)

I've been searching the internet for hours to try and solve this, but no luck so far.

I modified the orbiterroot property sheet as advised, and I'm using the Windows 10 SDK version 10.0.17763.0 but the problem still persisted.

Can someone please help me get this running?

Many thanks,
msligo
 
Last edited:
I would suspect "a path containing spaces" is the issue here.
Easiest work-around is to move your Orbiter development path to some path without spaces (like "C:\Orbiter").

If you don't like to move your work, you might have to edit the project file(s) and add some double-quotes here and there...
 
Back
Top