View Full Version : Visual CPP express throwing a major fit
12-22-2007, 01:58 AM
I'm trying to compile the SDK sample gauges and CPP X is throwing errors all over the place. i won't go through them all, but it starts off with:
'GAUGE_NAME' : undeclared identifier.
This refers to the line in the Temperature.c c file : char temperature_gauge_name = GAUGE_NAME;
GAUGE_NAME, of course, is actually defined in SDK.c, but SDK.Temperature.c is tripping over it.
Mind you, I haven't touched these files. I'm just trying to get a handle on compilation now that I (somewhat) understand how all the files worked.
LOTS of syntax errors. And I mean a ton. It doesn' like a lot of the semicolons (???), for example.
Am I just barking up the wrong tree tyring to use CPP Express or have I just done something really stupid to cause all these problems. Anybody have success compiling gauges with CPP Express?
12-22-2007, 02:23 AM
Sounds like you've forgotten to correctly set up some dependencies.
12-22-2007, 02:34 AM
OK, I've gotten it down to just two problems. I reread some of Dai's stuff and double checked some things. I can get a good compile now, but I have to leave out the temperature gauge and flight map. As long as I comment those out in the SDK.c, all is well.
Now, if I leave them in, they each present a similar problem:
This, if I include temp gauge: SDK.obj : error LNK2001: unresolved external symbol __imp__wsprintfW
1>E:\Projects\SDKGauge\SDKGauge\Debug\SDKGauge.gau : fatal error LNK1120: 1 unresolved externals
this, if I cinclude flightmap:error LNK2019: unresolved external symbol __imp__LineTo@12 referenced in function _FlightMapCallback@12
I actually get several errors with flightmap and they all look very similar to the above. They just reference different geometric shapes like ellipse, polygon and rectangle. (Sounds like drawing elements going haywire?)
These are my last two very specific problems. If I can get past these, I'm home with compilation.
Thanks for your response earlier.
04-02-2008, 11:32 PM
I WAS getting a similar problem - 'unresolved external objects' etc, whenever I tried to do something that depended on something more than the basic FS SDK. jwenting's comment about dependencies clued me up though:
Find the project linker properties (in VC++ 2008, that's Project, Properties, Linker) and find 'Additional Dependencies'. Type in the name of the .lib files that your gauge might need. In my case, it was FSSound.lib and CIVASDK.lib.
04-03-2008, 03:15 PM
The following is the build log from compiling the entire SDK Sample project as a /MD (Multi-threaded DLL) file. You can see the additional dependencies required easily. If you'd like the entire project so you can simply load the "Solution" into your VCC, write to me at firstname.lastname@example.org and I will send it as a file attachment:
Build Log ------- Build started: Project: Sample, Configuration: Release|Win32 -------
Command Lines This edition of Visual C++ does not support the optimizing compiler.
This edition of Visual C++ does not support the optimizing compiler.
Creating temporary file "c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\Release\RSP000001.rsp" with contents
/G7 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "SAMPLE_EXPORTS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /c /Wp64 /Zi /TC
Creating command line "cl.exe @"c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\Release\RSP000001.rsp" /nologo"
Creating command line "rc.exe /fo"Release/SDK.res" ".\SDK.rc""
Creating temporary file "c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\Release\RSP000002.rsp" with contents
/OUT:"Release/Sample.gau" /INCREMENTAL:NO /NOLOGO /DLL /DEBUG /PDB:"Release/Sample.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /IMPLIB:"Release/Sample.lib" /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Creating command line "link.exe @"c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\Release\RSP000002.rsp""
Output Window Compiling...
c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\SDK.FlightMap.c(152) : warning C4018: '<' : signed/unsigned mismatch
Creating library Release/Sample.lib and object Release/Sample.exp
Results Build log was saved at "file://c:\Documents and Settings\Bill Leaming\My Documents\Visual Studio Projects\Gauges\SDK_Sample\Release\BuildLog.htm"
Sample - 0 error(s), 1 warning(s)
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.