Sign in to follow this  
Guest jdallen26

Looking for help with C++ gauges...

Recommended Posts

I need help getting started with developing gauges with C++. I have VS.NET 2003 and have been going through the posts on this forum. I have found some information on setting the IDE up and so on. I need help compiling the sample gauge that is included in the SDK. I start out with a blank dll project and then add all the files for the sample gauge and try compiling it. It gives me numerous errors including------ Build started: Project: AAFID, Configuration: Debug Win32 ------Compiling...SDK.Wiskey.cc:Documents and SettingsJayMy DocumentsVisual Studio ProjectsAAFIDSDK.Wiskey.c(5) : error C2065: 'GAUGE_NAME' : undeclared identifierc:Documents and SettingsJayMy DocumentsVisual Studio ProjectsAAFIDSDK.Wiskey.c(5) : error C2099: initializer is not a constantc:Documents and SettingsJayMy DocumentsVisual Studio ProjectsAAFIDSDK.Wiskey.c(6) : error C2061: syntax error : identifier 'wiskey_list'and the list goes on and on. I have followed all the information I could find on line and to no avail. I am an advanced VB Developer(6 yrs) and have found no good reason to use C++ till now. Is there any was someone could send me a simple sample gauge I can examin and learn from. Also need help with compiling.Thanks.jay.allen1@us.army.mil

Share this post


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

You added all .c files to your project, right? If so, you have to make sure that all gauge source files (SDK.something.c) are excluded from the build. They're already #included by the main source file (SDK.c) so that should be the only file to be actually compiled.

Share this post


Link to post
Share on other sites

Aha, that's what it was. Thanks. Now I try using the gauge in an aircraft and it does not show up. Working on that right now.

Share this post


Link to post
Share on other sites

OK, now I'm dumbfounded:-(. I can compile it, but when I open the gauage up in a text editor, it has a bunch of error lines. I'm gona include the gauage with this post and maby you can see what I'm doing wrong.

Share this post


Link to post
Share on other sites

>OK, now I'm dumbfounded:-(. I can compile it, but when I open>the gauage up in a text editor, it has a bunch of error lines.>I'm gona include the gauage with this post and maby you can>see what I'm doing wrong.I have the entire Sample gauge project set up for VS 2003 .NETPerhaps it will help you sort out what you've got setup incorrectly, as this one will compile a working SDK.gau file...Write to me at n4gix@comcast.net if you'd like to receive the file, as it is too large for a file attachment here...

Share this post


Link to post
Share on other sites

It works finaly. Thankyou for the sample project. When I wenty to compile it, it gave one error (unable to find fs9gauges.h). I do not have that file and am not able to find it on the internet anywhere. If you have this file, may I get a copy of it? Also, it;s throwing one warning (warning C4018: '<' : signed/unsigned mismatch). I dont't know if it will cause issues with the gauge or what. Also, if there are any other resources I could get would be great. I'm just learning, but give me a few months and I'll be "flying" with this. I plan on making a gauage that will be panneled, like the GPS unit. It will display usefull info about most aspects of the flight. I'll post it beta testing as soon as I can. Thanks again for your help.Jay Allenjay.allen1@us.army.mil

Share this post


Link to post
Share on other sites

The archive sd2gau17.zip, available at flightsim.com was, I believe, the original source for the file fs9gauges.h, although it may now be available elsewhere. To get yourself started, you should be just fine using the file GAUGES.H from the MS Panels SDK. Just change the reference in the source file.BTW, sd2gau17.zip is a gauge creation tutorial. It is fairly technical, but does have a wealth of useful information.Doug Dawson

Share this post


Link to post
Share on other sites

>It works finaly. Thankyou for the sample project. When I>wenty to compile it, it gave one error (unable to find>fs9gauges.h). I do not have that file and am not able to find>it on the internet anywhere. If you have this file, may I get>a copy of it? Doubleclick on the "error" line in the lower panel to move the diagnostic pointer to the offending line in the source file.Change the name to whatever you call the gauges.h file in your inc folder of VS 2003 .NET... ;)As Doug pointed out, I am using a modified version of the "stock gauges.h" file from the MS SDK that is included in sd2gau17.zip from Dai Griffith's tutorial (actually, it's more of a BOOK than a simple tutorial!)...I've since made a few custom modifications of my own to the one supplied by Dai (which was itself heavily annotated and modified by our friend Arne Bartels)... ;)

Share this post


Link to post
Share on other sites

Ok, got it straightened out, but I'm unable to find sd2gau17.zip. The only thing I can find is a file listing of it.I'm able to display 1 image and noting else. Working on it. Thanks for all the help.

Share this post


Link to post
Share on other sites

Bill,Thanks for the file. I've learned a lot and pretty mutch got the image and text bascics downw. Thank you guys for all the help.Jay Allen

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