General Question Visual c++ 2008 setup compiling

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Well, it's actually that easy. In most cases it isn't anything more than Face listed. Visual Studio doesn't need to be set up for Orbiter, but only the OrbiterSDK environment for the Visual Studio (mentioned already multiple times OrbiterDir). With Visual Studio 2010 and newer you additionally only need to open 2 of OrbiterSDK samples (one for vessel, one for plug-in) to get the property sheets converted to new file format, and then you can do like you did in VS2005 or VS2008.

Additional dependencies (e.g. Orbitersound, Payload Manager, etc.) may have more complicated instructions of how to set them up in a project, but that can be also simplified by moving their headers and libraries into OrbiterSDK and make use of the OrbiterDir macro.
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,883
Reaction score
2,136
Points
203
Location
between the planets
and there's me thinking it's as easy as adding the relevent h files,lib,sheets ect.

It is "that easy", but if you're unfamiliar with the IDE and the project environment, it can be dwarf fortress kind of easy :lol:
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
238
Reaction score
124
Points
58
Location
Lehi, Utah
Steps to begin understanding the IDE 'fortress':

Download and install the latest free compiler tools from MS. Express or Community will do. Make sure you install C++ support.

Create a folder with a clean copy of Orbiter 2010.

Open the ShuttlePB sample solution and let it complete the conversion. As has been mentioned, this will convert the property sheets.

Open Property Manager (View/Other Windows/Property Manager). Open the property tree until you see 'orbiterroot'. You can do this under the Debug or Release configuration. Right click on 'orbiterroot' and select 'Properties'.

Select 'User Macros' on the left, and change OrbiterDir to the folder for your clean copy of Orbiter. Click OK.

On a clean system, ShuttlePB should build without error.

To debug:

Open the ShuttlePB project properties (from solution explorer right click on the ShuttlePB project node). In the 'Debugging' settings set 'Command' to $(OrbiterDir)\Orbiter.exe and Working Directory to $(OrbiterDir).

Now, open the ShuttlePB.cpp file and put a break point someplace in the clbkSetClassCaps method, for example on the 'SetSize (PB_SIZE);' line.

Now press F5. The project should build, and Orbiter should run. Open the Delta-glider : Brighton beach scenario (it will load the ShuttlePB) and during initialization your break point should be hit.

This is a minimal working system, but should help you become familiar with what is going on.

I just ran through these steps myself on a clean copy of Windows 10 using Visual Studio 2015 Community. Your mileage may vary, but it really shouldn't.
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
Thanks it worked!:woohoo: now need to enter paramiters.
 

egehq

New member
Joined
Nov 29, 2015
Messages
2
Reaction score
0
Points
0
Why Visual Studio 2008?I don't think it's good...
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Hi!! I am trying to start developing new addons, and I have just installed Visual Studio 2010.

Finally, I have got to set the property sheets, but I do have this new executing error:
'orbiter.exe': se cargó 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
....
and a largue list os similar ones.

Why is this happening?? Thank you!
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,932
Reaction score
2,946
Points
188
Website
github.com
Hi!! I am trying to start developing new addons, and I have just installed Visual Studio 2010.

Finally, I have got to set the property sheets, but I do have this new executing error:
'orbiter.exe': se cargó 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
....
and a largue list os similar ones.

Why is this happening?? Thank you!

You wouldn't be compiling for x64 (a.k.a. 64 bits)? If so try x86 (32 bits) in Properties > Linker > Advanced > Target Machine.
 

ADSWNJ

Scientist
Addon Developer
Joined
Aug 5, 2011
Messages
1,667
Reaction score
3
Points
38
Hi!! I am trying to start developing new addons, and I have just installed Visual Studio 2010.

I left Visual Studio 2010 last year for Visual Studio 2015 (and now Visual Studio 2017 if you prefer). Just a couple of features you may like on the free edition of VS2015:

1. Native Github integration. Each time you get to a good checkpoint ni your code, do a commit and a push up to Github. That way, you have a permanent record in case your PC dies, plus others can see your code as you develop it. (Maybe help as well.)

2. C++ 11 native support. This was quite a large update to the C++ standard. For me, I liked the native thread functionality, and the auto variables, but there's a ton of little new things in the language.

On the downside - I know that there are issues with Linux WINE compatibility with VS2015 and higher, for those who like to run Orbiter in an emulated mode on a Linux box. Not sure when (or if) this will be fixed.

Either way - VS2010 is functionally capable of doing a fine job for Orbiter development.
 

laura

New member
Joined
Feb 20, 2017
Messages
17
Reaction score
0
Points
0
Thank you!

It was well set in x86. So finally, after adding the property sheets I just copied the property configuration from ShuttlePB which I had previously convert and run.
 
Top