Sign in to follow this  
Guest harry3

Dev C++ for gauges???

Recommended Posts

Hi!After a long time not doing anything for flight simulator, I want to make some gauges in C.(I think I've now enough experience in that language to try again)I'm not too bad at XML, but I want to learn programming C gauges finally because of some advantages(e.g. sound)As my favorite compiler is Dev C++, I wanted to ask if it's possible to use this compiler for gauges too?Would be good if it's possible to use this compiler, otherwise I've to use MS Visual C++ 6.0, which I don't like too much.(but wouldn't be a too big problem;-))Regards,Harry

Share this post


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

Regarding Dev C++, after little bit of trial and error, I had luck getting the compiler to produce an operational gauge. However, after switching to Visual C++ 2005 Express, I will probably not be using other compilers for a while now.Adam

Share this post


Link to post
Share on other sites

What did you do to get Dev C++ running?Another question: Is it a bug of the fssound.dll that the looped sound1 doesn't stop when I call the MFSoundStop() function?if(erg>=29.92) MFSSoundResPlay(sound1, 1);//plays sound1 loopedelse MFSSoundStop(sound1);//should stop itBut the sound keeps playing and playing and playing...!?(FS2002)Regards,Harry

Share this post


Link to post
Share on other sites

>What did you do to get Dev C++ running?In Dev C++ IDE: menu Project -> Project Options (Alt+P)General tab: Type: Win32 DLLThat's all I had to do.>Another question: Is it a bug of the fssound.dll that the>looped sound1 doesn't stop when I call the MFSoundStop()>function?>>if(erg>=29.92)> MFSSoundResPlay(sound1, 1);//plays sound1 looped>else > MFSSoundStop(sound1);//should stop it>>But the sound keeps playing and playing and>playing...!?(FS2002)I would start with the simplest thing and check whether the condition (erg >= 29.92) is being fullfilled all the time. That may be causing the problemGLadam

Share this post


Link to post
Share on other sites

Thanks for the answer.I'll have a look at the Dev C++ compiler another time.The sound now also works:I've put the fssound function calls now into the GAUGE_CALLBACK under PANEL_SERVICE_PRE_UPDATE.And, I've made the sound dependent of a boolean variable and not of a float.Regards,Harry

Share this post


Link to post
Share on other sites

Dev C++ is now running without any problems for gauge compiling.The only thing which is important is to delete the Version info from the *.rc file. The .rc file must only contain the #include "*.h" and the bitmap resources.What I didn't manage until now is to get the fssound running in Dev C++.But maybe I'll find a way.The only defference in the output file is that the one from Dev C++ is bigger than the one from MSVC.(~800kb compared to ~100kb!?!?!)Regards,Harry

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