Jump to content
Sign in to follow this  
Guest newmav

Gauge Examples?

Recommended Posts

Guest newmav

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
Guest Patrick_Waugh

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
Guest ziporama

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
Guest newmav

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.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest newmav

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...