Sign in to follow this  
Guest newmav

Gauge Examples?

Recommended Posts

Does anyone know where I could get gauge examples that are compiled in the MS Visual Studio 2003 C++ environment? The examples that come with the SDK are makefile projects, and I'm not experienced enough to convert them. Thanks for any help.

Share this post


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

It is not that tough to use the SDK example in the VS environment.While many of us had trouble with VS 2003 back when we first got VS 2003, that was because it was so new to us.Basically, what I recommend is creating a "Gauge Projects" directory under your main VS 2003 projects directory, and then create and put the example SDK source under that in "SDK Demmo" for example.Then, click on "New project" and select a C++ Win32 (not console) project and when you get the dialog, set the project type to dll and check "empty project".By the way, you may just want to download and install the free VS 2005 which is way better. =)Then, you'll want to right click in turn on the header, source, and resoure folders on the solution explorer, and select "add existing item". Add the SDK.h, SDK.c, and SDK.rc respectively.Then, you'll want to make sure that you have the latest "gauge.h", and under your "Gauge Projects" directory create a new directory called "inc" or "include". Put that header or fs9gauge.h (the one by Arne) in that directory, and in the SDK.h file adjust the #include line to:#include "..incgauge.h"or#include "..includefs9gauge.h"you get the idea. This way it is available for all your gauge projects. Then, if you are using VS 2003 you'll need to make sure you are including any necessary libraries for the link. Try compiling it and if you get errors, post them and we can see which ones you are missing. Nice thing about VS 2005 is that they are all included automatically.Father Bill has posted some step by step tutorials over at flightsim.com that you can look at too!Patrick

Share this post


Link to post
Share on other sites

BTW, using VS 2005 also has its shares of problems with the C++ compiler and you need a bunch of #pragmas to disable warnings but it does work.Part of the masochistic fun in this is to figure out how to make 5 year old C programming technology, including a heavy does of pre-compiler macros to work in today's IDEs :)It does work, it's just not very simple. And the documentation doesn't help, not that it usually does, but most of it is rather useless.The good news is that gauge design is far better off than dynamic scenery design or flex wing design. That's real dedication :)

Share this post


Link to post
Share on other sites

Thanks much for your reply. I am getting a bunch of syntax errors (attached), so I suppose I'm missing or not properly connecting to some library. In my project settings, under the general C++ options, I put ..inc in the additional include directories. I did not put in the libraries:user32.libgdi32.libkernel32.libinto the linker input additional dependencies because they are included in the "inherited values". These are the only ones that are included in the makefile which I was compiling with NMAKE. Am I forgetting to do something in the project settings? Thanks again for your help.

Share this post


Link to post
Share on other sites

I looked at your output picture...That is not the correct way to build a multi-gauge... The very first error message makes that clear. ;)Write to me at n4gix@comcast.net and I'll send you the SDK setup as a MSVC++ .NET 2003 Project.

Share this post


Link to post
Share on other sites

Thanks everyone -I got it to work after stripping out all but one gauge and adding what was needed from the SDK.c file! I think I'm going to be able to add my external device control pretty easily from here. Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this