Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question to C gauge developers

Featured Replies

You may already know that I have developed many gauges in C. If not, you can have a look at my web site.I'd like to know how I can use Visual C++ environment in a "standard" way to develop C gauges. I mean, instead of using the FS SDK way of including C file into another one (#include "xxx.c"), I'd like to use the multiple source management offered by Visual C++. Instead of re-compiling the whole source code, this allows to re-compile only the modified C files.I don't know how to manage this because the Microsoft macros are quite complex...Thanks for any help !!

Hey Eric.Not sure. I use the #include method. Compiling all the files all over again after changing something in just one file wouldn't take long at all, if not for the thousands of warnings I get (all of them because I am assigning a float value to an integer, so a warning saying "Possible loss of data" shows up for each of them).If I knew how to turn these warnings off I'd be a happier lad!

"My way" is to use a subgauge.h file where only the GAUGEHDR is declared. Something like :#ifndef YOUR_SUBGAUGE_NAME_H#define YOUR_SUBGAUGE_NAME_H #undef GAUGEHDR_VAR_NAME #define GAUGEHDR_VAR_NAME gaugehdr_your_subgauge extern GAUGEHDR GAUGEHDR_VAR_NAME;#endif#included from the maingauge.c and the subgauge.c(pp). Then add maingauge.c AND subgauge.c(pp) to the project.I shift the GAUGE_HEADER_FS700 macro to the end of the file to allow to use non-extern declarations of gauge_name, list. I use also "static" declarations of any function and global variable to avoid name conflicts. At last I use a resource.h which includes all defined Bitmap IDS. Unfortunately, you can't split the maingauge.rc in such object targets as the maingauge.c file. I use to #include subgauge.rcs from the maingauge.rcs, not completely proper, but OK.So all .c files to the project, but only one (the maingauge.rc) to the project. I attach a reworked fs2000 SDK sample nas an example. You are free to use .cpp instead of .c or attaching opther .cpp files to the project.Arne Bartels

>If I knew how to turn these warnings off I'd be a happier>lad!#pragma warning( disable : 4761 )Change 4761 to whatever number that error message is. ;-)Matt

Matt Kaprocki

Boeing777_Banner_DevTeam.jpg

For fastest support, please submit a ticket at http://support.precisionmanuals.com

int_variable=(int)float_variable?Arne Bartels

Thanks for your explanations, Arne.I am sorry, bt I have one more question:I usually use Visual C++ (version 6.0) to generate an executable file (.exe). Do you know how I must configure the project settings in order to generate a gauge file instead (.gau)?I know the gauge files are DLLs, but I don't know how to configure MSVC for this. The files you attached are very helpful, it would be perfect if the worspace files (.dsw and .dsp) were also included...Many thanks !!Eric

Please forget my previous question, I found the answer by myself...I have created a "Win32 Dynamic-Link Library" project, and I change the build settings to generate a file called .gau instead of .dll.It works perfect !!Thanks for your help.Eric

The reason for not sending dsw and dsp was, that all paths in it are of course the ones on my machine, so you'll get more headaches with it that you get without.Arne Bartels

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.