Programming Question What IDE do you use?

Mr Martian

Orbinaut/Addon dev/Donator
Addon Developer
Donator
Joined
Jun 6, 2012
Messages
331
Reaction score
161
Points
43
Location
Sydney, Australia, Earth, Sol
Website
www.orbithangar.com
Hi all,

Just wondering whjat IDE people like to use for developing orbiter addons? I am still using Microsoft Visual C++ 2010, just becuase it's just familliar to me, but are people mostly using Visual Studio 2022 now? From memory I tried it before but struggled to set up the right working environment and subsequently lost interest...

Thanks all!
MrMartian
 

Mr Martian

Orbinaut/Addon dev/Donator
Addon Developer
Donator
Joined
Jun 6, 2012
Messages
331
Reaction score
161
Points
43
Location
Sydney, Australia, Earth, Sol
Website
www.orbithangar.com
Visual Studio 2022 Community right now.
Thanks Urwumpe. Were there any additional C++ components you had to install to get it set up properly? I have the latest MSVC v143 - VS 2022 C++. To your knowledge should also install any of the older packages like v140 or v141?
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
249
Reaction score
143
Points
58
Location
Lehi, Utah
When installing VC 2022 Community (as Urwumpe said) make sure to include the Desktop Development with C++. That should include everything you need. You should not need older version of MSVC unless you are building some add-in that requires it.

What I then do is open the ShuttlePB.sln from the OrbiterSDK/Samples/ShuttlePB folder. That will go through a conversion. It should then build. If you want to run that in the debugger there are a few more folders to setup, but you should have the C++ environment you need.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,841
Reaction score
2,574
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Thanks Urwumpe. Were there any additional C++ components you had to install to get it set up properly? I have the latest MSVC v143 - VS 2022 C++. To your knowledge should also install any of the older packages like v140 or v141?

Like Blake said, just the right Windows SDK and tools. On the optional plugin side, I included doxygen support and sonarlint on my installations for some years now.
 

Mr Martian

Orbinaut/Addon dev/Donator
Addon Developer
Donator
Joined
Jun 6, 2012
Messages
331
Reaction score
161
Points
43
Location
Sydney, Australia, Earth, Sol
Website
www.orbithangar.com
Okay done! I have converted the default ShuttlePB.sln and have it working. That being said, when I try to create a blank project from scratch I get all kinds of build errors, like 'error C2440: 'return': cannot convert from 'const char [12]' to 'char *'' in OrbiterAPI.h. I can just use the shuttlepb template, but I'd rather not do that every time I develop something for Orbiter. Has anyone found a better way to set up the right environment?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,841
Reaction score
2,574
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Okay done! I have converted the default ShuttlePB.sln and have it working. That being said, when I try to create a blank project from scratch I get all kinds of build errors, like 'error C2440: 'return': cannot convert from 'const char [12]' to 'char *'' in OrbiterAPI.h. I can just use the shuttlepb template, but I'd rather not do that every time I develop something for Orbiter. Has anyone found a better way to set up the right environment?

Yes, you need to change some default settings in the project settings since OrbiterSDK as originally developed to a much older VC++ version and C++ language standard. You should look for "/permissive"

 

Boxx

Mars Addict
Addon Developer
Donator
Joined
Nov 15, 2009
Messages
221
Reaction score
143
Points
58
Location
Paris Area
When installing VC 2022 Community (as Urwumpe said) make sure to include the Desktop Development with C++. That should include everything you need. You should not need older version of MSVC unless you are building some add-in that requires it.

is MSVC related to the runtime? I've been facing the problem of not having the runtime recognized, hence the user needs to have VS(2019) installed (which is a pitty for non-dev users). Am I missing some setup at compilation stage?
 

Blake

Addon Developer
Addon Developer
Joined
Mar 9, 2009
Messages
249
Reaction score
143
Points
58
Location
Lehi, Utah
is MSVC related to the runtime? I've been facing the problem of not having the runtime recognized, hence the user needs to have VS(2019) installed (which is a pitty for non-dev users). Am I missing some setup at compilation stage?

In the project properties, 'Code Generation/Runtime Libarary', pick one of the /MT (not /MD) options. That should compile the runtime into the DLL and avoid the need for the user to install the runtime libraries independently. For Orbiter add ons /MT (static library) is generally safe. For large programs with lots of interdependencies /MD is generally preferred, but those programs will also likely have an installer that includes the appropriate runtime DLLs.

At least this sounds like the issue you have.
 
Top