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.

Visual C++ .NET help

Featured Replies

  • Author

YesJust dis a makefile and compile the gauge with it just before release. I have a feelling that some "can't load" that appear from time to time in the foruns are due to this problem.Jos

Thanks for the help.Jos

You don't have to, C code in cpp files is (more or less) treated as C code. No classes needed. Ther could be some incompabilities, but the gauges.h is prepared to deal with them. Apart from that it's impossible to rewrite the gauge sceleton code to pure C++ in my opinion.So to enable C++ parts just rename to .cpp, the main C code in the gauge isn't touched by this.As a "COM" related interface in the Trafficc example it might be possible to use it also in pure C-code (via the vtbl->... stuff), but I haven't checked.Arne Bartels

  • Author

My personal way is to separate the gauge macros from C++ code. That's why you can find C files and CPP files. The CPP files in the example have one class (waveread.cpp) and Direct Sound code (sound.cpp) that also use that class. And pure Direct Input code (Joystick.cpp) That needs to be in a CPP file.Then when I need to call c++ functions from C just declare it has extern "C".Now I'm trying to do the same by putting C++ code in a dll but don't know why the dll is not loaded by the gauge. But since is only an exercise I didn't see deeply why. The functions are declared has:extern "C" _declspec(dllexport)Jos

  • 9 months later...

Hans,why is it necessary you use a .def? it looks like the gauges.h uses its own EXTERN_C DECLSPEC_EXPORT for it?could you shed some light about this?

  • Moderator

>Hans,>>why is it necessary you use a .def? it looks like the gauges.h>uses its own EXTERN_C DECLSPEC_EXPORT for it?Well, neither Ike Slack nor I need the .def file at all. We're both using Visual Studio C++ .NET (although I use the v7.x optimized compiler now).

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks! this is what I thought but reading this thread I was not sure. Now I am!

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.