Archived

This topic is now archived and is closed to further replies.

Guest Patrick_Waugh

Newbie question - compiling in C++

Recommended Posts

Hi everyone.I am getting back into making some freeware gauges after skipping a couple versions of the sim. I can compile new stuff using the previous SDK in C using a makefile, and they work fine in FS9/FSX, but is there any advantage to going to gauge creation in the Visual Studio IDE? I still use Visual Studion C++ 6.0 and don't have a newer version. All of the SDK samples are made in .net or something and I can't really open a workspace with them.Any insight would be appreciated.Jeff

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>I still use Visual Studion C++ 6.0 and don't have a newer>version. All of the SDK samples are made in .net or something>and I can't really open a workspace with them.You can download the Visual Studio 2005 Express Edition for free: http://msdn.microsoft.com/vstudio/express/...ds/default.aspxThe main advantage (aside from being able to load the examples of course!) is that you have a fully integrated environment, with no need to use archaic and clunkly command line compiling... ;)I have a number of "Sticky" posts in the Panel & Gauges forum at flightsim.com, which I moderate that describe how to set up and use MSVC++ .NET 2003 (which I use). The process for VS 2005 Express is pretty much the same.

Share this post


Link to post
Share on other sites

Jeff,>I am getting back into making some freeware gauges after>skipping a couple versions of the sim. I can compile new>stuff using the previous SDK in C using a makefile, and they>work fine in FS9/FSX, but is there any advantage to going to>gauge creation in the Visual Studio IDE?While a gauge compiled with the FS9 SDK might work, you will want to download, install, and read the current much more informative SDK. That alone will bring you up to speed quite a bit.As far as using the VS 2005 IDE which you can download free, the main advantage is the obvious one, it is a visual integrated development environment. Yeap, back in the day, makefiles and VI on the BSD box were the way, but you need to get with the 20th century, especially if you plan on programming for anything Windows.Yes, there is a learning curve, and you will have to either spend time looking around, buy a good book, fumble around, or some combination thereof, but there is simple no comparison to the advantages of a modern day IDE with intellisense (among other things), and many hundreds of other features you cannot appreciate until you begin using it (like code snippets and macros).>I still use Visual Studion C++ 6.0 and don't have a newer>version. Is that so? Well, head on over to microsoft.com and get you a brand spankin new VS2005, and then head on over to Bill's forum on flightsim.com where he details what you need to do to set up the IDE for FS development.>All of the SDK samples are made in .net or something and I can't>really open a workspace with them.Just get your computer up to snuff, and get VS2005 and you'll be fine. .NET is managed code, and you won't really need to worry about it at all for gauge development.Patrick

Share this post


Link to post
Share on other sites

I do a lot of Windows app programming using VS 6, so the concept of using an IDE is familiar to me. I'm just not sure if it would make gauge programming any easier or not. As far as the 2005 Express edition I have looked at that before, but wonder how big the learning curve is. I have gotten so used to the Class Wizard in VC 6.

Share this post


Link to post
Share on other sites

>I do a lot of Windows app programming using VS 6, so the>concept of using an IDE is familiar to me. I'm just not sure>if it would make gauge programming any easier or not. >>As far as the 2005 Express edition I have looked at that>before, but wonder how big the learning curve is. I have>gotten so used to the Class Wizard in VC 6.VS6 works just fine for C++ gauges for FS9 and FSX no worries. I still use it myself. You are not alone.Regards.Ernie.

Share this post


Link to post
Share on other sites

Well of course VC 6.0 still works. For that matter, I can also use MinGW to compile gauges for both FS9 and FSX......but, why would I want to? It takes me less than 40 seconds to set up a new Project in MSVC++ .NET 2003, and I never have to even look at a "Command Box" (DOS prompt).One click and the gauge project is compiled in either Release or Debug mode, and neatly placed in either the gauges folder or my a/c's panel folder, ready to test out. :)

Share this post


Link to post
Share on other sites

Are there any tutorials on how to set up the VC6 envronment for C++ gauges?Jeff

Share this post


Link to post
Share on other sites

>Well of course VC 6.0 still works. For that matter, I can>also use MinGW to compile gauges for both FS9 and FSX...>>...but, why would I want to? It takes me less than 40 seconds>to set up a new Project in MSVC++ .NET 2003, and I never have>to even look at a "Command Box" (DOS prompt).>>One click and the gauge project is compiled in either Release>or Debug mode, and neatly placed in either the gauges folder>or my a/c's panel folder, ready to test out. :)All of this falls within the features of VC++ 6.0.So within the limited view of gauge programming 'only' there's no largely compelling reason that requires one must immediately switch to VC .NET if you are currently quite comfortable with VC++ 6.0.Regards.Ernie.

Share this post


Link to post
Share on other sites

>Are there any tutorials on how to set up the VC6 envronment>for C++ gauges?>>JeffHere's a really good tutorial made by Brian Kostick several years ago.Can't remember where I originally got it from, but I have zipped it up and posted it here..http://www.fsbuild.com/dl/idehowto.zipJust extract the files, open the index.htm file and follow the steps from there.Regards.Ernie.

Share this post


Link to post
Share on other sites

>So within the limited view of gauge programming 'only' there's>no largely compelling reason that requires one must>immediately switch to VC .NET if you are currently quite>comfortable with VC++ 6.0.Save of course one of the issues the OP raised regarding opening and compiling the FSX SDK Sample gauge projects... :-beerchug

Share this post


Link to post
Share on other sites

*high five :-beerchugWhen in Rome, best to do as the Romans too. Also, calling it VC++ .NET (although MS does this too) is a bit mis-leading IMHO.Best to call it Visual Studio C++ (VS C++) as that is the IDE, and .NET really an API to the .NET framework. Of course one can use many different API's to program.At least this is how my feable brain keeps it straight.Patrick

Share this post


Link to post
Share on other sites

Jeff,>Are there any tutorials on how to set up the VC6 envronment>for C++ gauges?If you are really that much of a noob that you would need a tutorial to set it up, why learn a version that is out of date?If you are going to have to learn it anyway, just download the free (and much more capable) VS 2005.Trust me, you will be doing yourself a favor. I mean, if I asked you to get a computer (a tool), are you going to go get a 1980's model, or a more recent model? Yeah, it might take you less time to learn the Comadore 64, but then how much can you do with it?Patrick

Share this post


Link to post
Share on other sites

>Save of course one of the issues the OP raised regarding>opening and compiling the FSX SDK Sample gauge projects...Start with the FS9 SDK , most (if not all) of those examples are applicable to FSX. Once you become experienced in making a few gauges those SDK examples are not so necessary. The features described in the FSX SDK can be fully applied in VC++ 6.0.My point merely is if you 'already have' VS 6.0 why not *start* with what you are already familiar with ?You can always upgrade later on if you feel it necessary.Regards.Ernie.

Share this post


Link to post
Share on other sites

>>My point merely is if you 'already have' VS 6.0 why not>*start* with what you are already familiar with ?>>You can always upgrade later on if you feel it necessary.>Normally i would agrre with You. But on the other Side, with VS2005 you get the latest Compiler and Linker from MS. I thimk that is very Important.Before VS2005 (i still use the Express Edition) i used the Command-Line Tools from VC++ 6.0 and another Texteditor (MED) which i found more comfortable as the VC 6.0 IDE. After switching to VC2005 EE i use the IDE. I have customised the Syntax Highlighting and set it up for Debugging. Also the most likely Feature is IntelliSense (which is in VC 6.0 also). So, i also would prefer to use the latest IDE.Kind RegardsSven

Share this post


Link to post
Share on other sites

Patrick,I'm not a noob at all when it comes to VC 6. I have been using it for years, and pretty much every day. I'm sure the newer version has lots of whisles and bells, but there would be a learning curve. I know I need to do it someday soon, but right now I just don't have the time.The reason I brought all this up in the first place is that when I look at the newest MS SDK it looks to me like like using the IDE simply involves using the same C coded gauge files and simply collecting them in an IDE environment. Is it possible to use any of the foundation classes or other C++ features in FS X gauges?Jeff

Share this post


Link to post
Share on other sites

Jeff,Sorry, I got confused by your last post saying you had to learn.As far as MFC, yeap, and C++ features, yeap. Someone here (forget who) has actually created a proprietary framework to create gauges.OO design is a big leap for most C guys, so many are still really programming C-like, especially since it is not entirely clear how to use the SDK interfaces and would be another learning curve.I sort of use a mix myself, with basic gauges in c-like C++ but an OO back-end that does the real work. Others are now moving to XML front-end gauges, and C++ .dll back-ends.

Share this post


Link to post
Share on other sites

This linker thing is getting me... Am now trying to use Visual C++ 2008 due to VC6.0 being incompatible with my new Vista-(ugh...) equipped machine.I would like it to compile my gauge toE:Flight Simulator 9GaugesDo128-6_V2.gauWhat do I need to enter in my output file box in the linker section of the IDE settings to get the compiler to comply? I have so far found no usefull info on this in the accompanying documentation, nor have I found a working solution here nor at the "other" site.This is simple stuff, I know, but when you don't know even the simplest thing it just won't work...

Share this post


Link to post
Share on other sites

This should work... You left off the initial backslash... ;)E:Flight Simulator 9GaugesDo128-6_V2.gauI am currently working on a gauge that uses this path in the Linker:K:FSXSimObjectsAirplanesEaglesoft Cessna Citation CJ1 1.5panel.wsESXLS_Misc.gauBTW, my K: drive is another computer in the other room! :-abduct

Share this post


Link to post
Share on other sites

All of your current VC6 gauges will open and compile successfully in VS2005. I'm using VS2003 ATM - I refuse to go to VS2005 simply because I know I have to jump to VS2008 fairly soon. Bryan Kostick's IDEHowTo is still relevant in its information but the screenshots are for VC6 rather than any version of VS - you need to find the relevant VS areas and IIRC most of them are under the Options menu.Your comment about MS and the current SDK is correct; the C-language samples they provide are the ones that first appeared with FS2000.-Dai

Share this post


Link to post
Share on other sites

Thanks Bill, am feeling stupid *:-* Now comes true business, let's see if I can get that compiler to get through it's process without hickups of multiple definitions and such. Painful learning curve...

Share this post


Link to post
Share on other sites