General Question Visual c++ 2008 setup compiling

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
I have installed the vessel template addon for defining the thruster locations for shuttlepb and it will not complile saying cannot find the h files and the files located in orbiter\sdk\samples\include.What is the easiest to do,will copy/pasting the files from include in one of the visual studio 9 folders cure the problem or do the correct paramiters have to be specified in properties?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Why Visual Studio 2008? :blink:
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Did you change the OrbiterDir macro in orbiterroot property sheet to point to the path of your Orbiter installation (assuming that you opened the included solution/project from the sample directory)?
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
[Why Visual Studio 2008?]

2008 should be OK for addons as I will not use it too often.

[Did you change the OrbiterDir macro in orbiterroot property sheet to point to the path of your Orbiter installation (assuming that you opened the included solution/project from the sample directory)?
11-04-15 02:27 PM]

I copied/pasted the vessel wizard into the specified folders as per the instructions that contains the shuttlepb sample code. Do I have to link visual c++ to orbiter sdk or is there an easier way copying from sdk to relevant folders in the visual program?
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
The missing include files sound like not properly configured project.

In case of Orbiter samples or projects deriving from them you only need to configure OrbiterDir macro in one of the referenced property sheets, and you only need to do it once for all if you don't ever move Orbiter to another directory.

I have never used "vessel wizard", but you probably need to set the include path and the library path directly in the project settings or alternatively add the Orbiter property sheets from "resources" subdirectory of Orbitersdk (and then you can configure the OrbiterDir macro in the Property Manager if you never changed it).
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
What folder in vc++ do the property sheets go into and what is typed into orbiterdir macro sheet?
 

Malky

Member
Joined
Feb 11, 2014
Messages
64
Reaction score
0
Points
6
Would it be possible, for some experienced addon developer, to write down very simple (like for idiots like me) guide, how to setup visual studio, so it is able to compile code for orbiter addon dll? I believe it would be very aprecieted, not only from me.
Thanks!
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Would it be possible, for some experienced addon developer, to write down very simple (like for idiots like me) guide, how to setup visual studio, so it is able to compile code for orbiter addon dll? I believe it would be very aprecieted, not only from me.
Thanks!

There have been video tutorials on that. Also Orbiterwiki contains an article about it.

But sadly, you often have to take special paths for different versions of the C++ runtime library. C++ 2015 refuses to compile with OrbiterSound for example right now, because of library conflicts, that I still have to resolve.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
What folder in vc++ do the property sheets go into and what is typed into orbiterdir macro sheet?
Property sheets don't go into any folder in VC++. They stay in Orbitersdk.

You add these property sheets to your project in Property Manager (if you can't see such thing you need to check a checkmark next to "Expert Settings" in Tools->Settings, but don't worry, it's used only to hide menu items and AFAIK it's only in VS2010; the VS will still talk to you in English and not in binary if you change it :p).

You simply create a new empty project (and optionally add a cpp file - currently I can't check if it's required to get the configurations shown in Property Manager, or will they already show without it), next go to Property Manager's tab (under Solution Explorer) or choose View->Property Manager, right click on Debug configuration there, choose to add existing property sheet, browse to Orbitersdk\resources and add "Orbiter Vessel" or "Orbiter Plugin", right click again and add "Orbiter Debug", then you do the same for Release configuration, but without adding "Orbiter Debug" property sheet.

You can change OrbiterDir macro by expanding the tree in Property Manager, finding "orbiterroot" property sheet and editing it. You set there the full path to the Orbiter root directory. You do it only once. The next projects which will use these property sheets will have the macro already set. Additionally when you share your project with other people, the other people's macro configuration will be used, so they won't need to change anything in the project.

If you previously changed some setting in the project, now you can set them to inherit from the project parent's/defaults. Orbiter paths and settings are already set. In newer VS you only need to change the project type from EXE to DLL.



@Malky: which version of Visual Studio? In VS2010 and newer there is additional step required to get the property sheets converted to new file format.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Would it be possible, for some experienced addon developer, to write down very simple (like for idiots like me) guide, how to setup visual studio, so it is able to compile code for orbiter addon dll?

I think the primary obstacle here is the unspoken premise of using a freely available compiler.

If you use a paid Visual Studio 2005, it is as easy as:

  • unzipping Orbiter package
  • editing the file Orbitersdk/resources/orbiterroot.vsprops to point to the proper root folder (where you've unzipped Orbiter into) instead of the default "c:\source\orbiter"
  • installing Visual Studio 2005
  • double-clicking any *.sln in the Orbitersdk/samples/* folders
  • using menu entry "Build->Build Solution" or pressing F6
You can then immediately start to modify the code and thus create your own work.
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
Would devc++ be easier to use as its complier is free I think?
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
I think i've probably set somthing wrong,how do I reset the properties to default and start again?
 

Malky

Member
Joined
Feb 11, 2014
Messages
64
Reaction score
0
Points
6
I think the primary obstacle here is the unspoken premise of using a freely available compiler.

If you use a paid Visual Studio 2005, it is as easy as:

  • unzipping Orbiter package
  • editing the file Orbitersdk/resources/orbiterroot.vsprops to point to the proper root folder (where you've unzipped Orbiter into) instead of the default "c:\source\orbiter"
  • installing Visual Studio 2005
  • double-clicking any *.sln in the Orbitersdk/samples/* folders
  • using menu entry "Build->Build Solution" or pressing F6
You can then immediately start to modify the code and thus create your own work.


Ok, this seems to work for me, at least partialy, as I get 'build succesful' message. But it won't create dll. Any advice?

Anyway, thanks, this helped me at least a little in right direction :)
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
235
Reaction score
123
Points
58
Location
Lehi, Utah
Visual Studio 2015 Community and Express are free and both support Orbiter development.

Community is full featured and free unless you are a group over a specified size doing commercial development. Nothing that should impact an Orbiter developer.

The latest version of my SR71r is compiled in VS 2015 Community for example.

I have started a walk through of setting up VS 2015 Community for Orbiter work. I'll try to get back to it--too many cool things to do in Orbiter, too little time.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
But it won't create dll. Any advice?

It should have created the DLL already in the right place of your Orbiter installation. If you e.g. compiled DialogTemplate, you should now have a "DialogTemplate" in Orbiter's module list. This is because the output settings of those projects are already set for proper deployment into the Orbiter folders, which is in the case of the example /Modules/Plugin/DialogTemplate.dll .

Just check the time stamps of the DLLs if you are not sure if anything happened at all.
 

jangofett287

Heat shield 'tester'
Joined
Oct 14, 2010
Messages
1,150
Reaction score
13
Points
53

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,882
Reaction score
2,133
Points
203
Location
between the planets
Ah yes, the joy of setting up visual studio for the first few dozen times... I think it's the threshold where most hopeful new add-on developers throw the towel.

I'm not going to post precise instructions, they should be around somewhere and would take me the better part of the evening (which is already reserved for homework, I'm afraid), but let me encourage you: What you're doing currently is not simple or easy. It can make you feel stupid, because you'd expect that programming would be the hard part, but that's not quite true. Setting up a completely foreign IDE for a completely unfamiliar project environment with minimal instructions is a frustrating hassle even for professionals, and they have a lot more of an idea of what's needed and what's going on than you have currently.

Once you get through this, you're through the worst, so hang in there! I remember myself almost quitting it at the first few attempts.
 

T1234

New member
Joined
Jan 14, 2012
Messages
220
Reaction score
0
Points
0
and there's me thinking it's as easy as adding the relevent h files,lib,sheets ect. :compbash:
 
Top