Jump to content
Sign in to follow this  
Guest BertusS

Compiler problems using Microsoft Visual C++ Enterprise Edition

Recommended Posts

Guest BertusS

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

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

Share this post


Link to post
Share on other sites
Guest BertusS

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
Guest HartmannH

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

>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

Share this post


Link to post
Share on other sites
Guest BertusS

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
Guest HartmannH

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... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest BertusS

Thanks Hans, I received that.Bertus

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...