Sign in to follow this  
Guest BertusS

Compiler problems using Microsoft Visual C++ Enterprise Edition

Recommended Posts

Can anyone help pleaseI tried to compile the SDK gauge provided by the 2004 Panels SDK with Microsoft Visual C++ 6.0 Enterprise Edition without success. For all of the gauges (subgauges from Attitude through to Flightmap) an extract of compiler errors: SDK.Wiskey.c(5) : error C2065: 'GAUGE_NAME' : undeclared identifier SDK.Wiskey.c(5) : error C2099: initializer is not a constant SDK.Wiskey.c(6) : error C2061: syntax error : identifier 'wiskey_list' SDK.Wiskey.c(6) : error C2059: syntax error : ';' SDK.Wiskey.c(7) : error C2061: syntax error : identifier 'wiskey_mouse_rect' SDK.Wiskey.c(7) : error C2059: syntax error : ';' SDK.Wiskey.c(7) : error C2059: syntax error : '[' SDK.Wiskey.c(9) : error C2059: syntax error : ',' SDK.Wiskey.c(9) : error C2143: syntax error : missing ')' before '&' SDK.Wiskey.c(9) : error C2143: syntax error : missing '{' before '&' SDK.Wiskey.c(9) : error C2059: syntax error : '&' SDK.Wiskey.c(10) : error C2059: syntax error : ')' SDK.Wiskey.c(14) : error C2061: syntax error : identifier 'wiskey_fail'ETC, ETC, ETCThe errors in each gauge is exactly the same!When I compiled the gauge with the NMAKE facility provided by 2004 Panels SDK, compilation was successful.I also tried the fs9gauges.h (renamed gauges.h) modified spring 2004 by Arne Bartels in place of the supplied gauge.h.I followed Bryan Kostick

Share this post


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

Thanks DougYou were right, I did flag files wiskey.c, flightmap.c, etc, to be included in the build. With that now sorted out, I am left with two warnings:SDK.FlightMap.c(152) : warning C4018: '<' : signed/unsigned mismatchSDK.FlightMap.c(159) : warning C4018: '==' : signed/unsigned mismatchI do not have enough experience with C++ to decide if I should ignore them and if it is truly a code design mistake. I did read somewhere that it is in some cases best to to ignore the warnings. Care to comment?Much appreciatedBertus

Share this post


Link to post
Share on other sites

Comparing signed and unsigned variables result in this warning. Most likely, an UINT32 is compared to an int or something similar in those lines. In most cases this is not a problem. Line 152:> int i;> POINT prevp;> for (i = 0; i < gpsinfo->lWpCounts; i++)i is an int (abbreviation for unsigned integer) and gpsinfo->lWpCounts is a UINT32. Change the declaration of i from int to UINT32 to fix this problem.Line 159:> if (gpsinfo->lNextWp == i)gpsinfo->lNextWp is a UINT32 too so the fix for line 152 will solve this problem too.Hope that helps.

Share this post


Link to post
Share on other sites

Hallo HansThanks very much. I would never have even considered the possibility that comparing signed and unsigned variables (or bitwise) could be the problem. As a beginner in programming, information like this are valuable.As for Bill, your tutorial in setting up your workspace in building a gauge are much appreciated. I only wish I new about your tutorials a week ago! Learning about the right click to open the xxxx.rc file with a text editor and a way to exclude the subgauges from building without deleting them everytime felt especially good.All the bestBertus

Share this post


Link to post
Share on other sites

I just saw that I made a little mistake in my post above. int is a signed integer, not an unsigned integer.

Share this post


Link to post
Share on other sites

>As for Bill, your tutorial in setting up your workspace in>building a gauge are much appreciated. I only wish I new about>your tutorials a week ago! Learning about the right click to>open the xxxx.rc file with a text editor and a way to exclude>the subgauges from building without deleting them everytime>felt especially good.Thanks. I posted an announcement here about a month ago, but just now 'bumped it' back to the top. It needs to be made a 'sticky topic' I should think... ;)

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