December 21, 200520 yr 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
December 21, 200520 yr I suspect that each of the files wiskey.c, flightmap.c, etc, that you have flagged the files as being included in the build. Because these files are explicitly #included in the file SDK.c, you should set their individual properties to exclude them from the build.Have a look at this post, from the other place...http://forums.flightsim.com/dc/dcboard.php...esg_id=22&page=Doug
December 22, 200520 yr 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
December 22, 200520 yr 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.
December 22, 200520 yr Moderator >Have a look at this post, from the other place...>http://forums.flightsim.com/dc/dcboard.php...esg_id=22&page=Thanks for pointing the OP there, Dave. Apparently my explanations are clear enough to be useful... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
December 23, 200520 yr 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
December 23, 200520 yr I just saw that I made a little mistake in my post above. int is a signed integer, not an unsigned integer.
December 23, 200520 yr Moderator >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... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment