Jump to content
Sign in to follow this  
Guest harry3

C Gauges-absolut beginner!!!

Recommended Posts

Guest harry3

Hi!I've benn making XML gauges now for a while and it all works fine.I wanted to make a C Gauge since a long time. But it never worked. Today, I've tried more than 2hours to compile the SDK gauge with Microsoft Visual C++ Studio 6.0.But all the time, there were 37 errors inside the gauge.What I have to say: I've deleted everything expect the Attitude Indicator.(of course in all files, so that they don't have different informations).But why are there 37 errors? Those all were syntax errors. What have I done wrong, or better, what must I do to compile a gauge in MS VS 6.0???I've first selected an empty workspace, have included the .c and .rc files, and then the makefile, which I've made with the makefile generaot from Dai G.Where must I select the file format, that the MS VS6.0 knows that the goal should be the sdk.gau???Dai G. gauge description doesn't really help me, because I couldn't find any solution for my problem.Best regards,Harry

Share this post


Link to post
Share on other sites

So you are trying to build the gauges in the VC IDE, right? I find it is easiest to set it up using nmake instead of the IDE. Either way, what was the first error you were getting. Fixing the first one could fix all 36 other errors as well. >>Where must I select the file format, that the MS VS6.0 knows that the goal should be the sdk.gau???Take a look inside the makefile. It will say something like "goal: FAF.throttle.gau". Since you're using the IDE, you need to open the workspace through the makefile. It gets kind of strange when it needs to convert files and such, so I use a text editor to edit the source code and build it using the command line. Dai's SDK has examples of how to use nmake instead of the IDE. The one advantage to using the IDE, though, is that you can use it to debug gauges. It it very helpful to be able to step through the code with FS running. I've got it figured out now, but it was not easy to do. ;)Also, since you're using his makefile generator, you will need to edit the makefile it created. His makefile will be looking for an extra header file that hasn't been used since FS98.Matt

Share this post


Link to post
Share on other sites
Guest harry3

Thanks for the answer.I now have tried to do it via nmake.But when I start my vcars32.bat, it always tells me that there's not enough disk space available in the enviroment. Don't know what that should mean, because there are 2GB still free.Do I really need this FS98-header file? And if yes, where do I get it from?Best regards,Harry

Share this post


Link to post
Share on other sites
Guest bartels

There are two ways to compile a C gauge with Visual C.First: with the IDE, add only the main.c and the main.rc to the workspace!, not the subgauge.c's. Second: with nmake, it might be possible that the standard DOS box doesn't allocate enough memory for running nmake. Edit the properties of the DOS box and increase the initial memory.And latest it helps to post at leat the first say ten errors to see what you've done wrong.Arne Bartels

Share this post


Link to post
Share on other sites
Guest harry3

Ok, could be that I'm a bit silly in C things, so please excuse me!In school we've learnt with Turbo C++, and I'm not that familiar with MSVS6.0 than I'm with Turbo C++. The Memory problem is solved!BUT:I can't edit the vcvars.bat, always, when I hit any key, the programm tells me that the programm has already finished("Diese Anwendung f

Share this post


Link to post
Share on other sites
Guest bartels

Sorry if this is not English, but I'm not sure how it is called in the English Windows versions.Sieht so aus als h

Share this post


Link to post
Share on other sites
Guest harry3

Sorry, again not English:Kurz nach dem ich die Frage wegen dem Bearbeiten ins Forum gestellt habe, bin ich draufgekommen, dass es sogar mit Notepad geht!!!Also, ich gehe auf Verkn

Share this post


Link to post
Share on other sites
Guest harry3

Hi again,I've tried to make a link to this vcvars32.bat, then set the command line to "command.com", then I've started the link: Now the line C:WINDOWSDesktopAktenkoffergauge> appears. So, and now? I've now tried all things like nmake ... but never worked. So, what's to do?In MSVS6.0, when I just load the master source file and the .rc file, how does the compiler know, in which format the file must be saved?Under Execute, there's written "Execute SDK.gau", under Build, there's written "Build SDK.exe". So, there must be something wrong!Best regards,Harry :)EDIT: Sorry bartels, I've not been in the FXP forum since yesterday. I'll have a look at the topic there!!!

Share this post


Link to post
Share on other sites
Guest harry3

It has worked now.There was a super discription about the IDE-gauges-compiling.Thanks to all of you,Harry

Share this post


Link to post
Share on other sites
Guest harry3

I sometimes get errors like this: What does that mean again?--------------------Configuration: sdk - Win32 Debug--------------------Compiling resources...Compiling...SDK.Wiskey.cc:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(12) : error C2065: 'GAUGE_NAME' : undeclared identifierc:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(12) : error C2099: initializer is not a constantc:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(13) : error C2061: syntax error : identifier 'wiskey_list'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(13) : error C2059: syntax error : ';'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(14) : error C2061: syntax error : identifier 'wiskey_mouse_rect'--and so on...-error : missing ')' before identifier 'pelement'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(29) : error C2061: syntax error : identifier 'pelement'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(29) : error C2059: syntax error : ';'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(29) : error C2059: syntax error : ')'c:windowsdesktopaktenkofferhs_gaugessamplesdk.wiskey.c(30) :

Share this post


Link to post
Share on other sites
Guest bartels

Check your main .c file if GAUGE_NAME is properly defined before the #include "SDK.wiskey.c" line.The other errors look like following errors, if one variable is initialized wrong, the rest ihght also fall apart.Arne Bartels

Share this post


Link to post
Share on other sites

Arne-(and everyone)this looks like the compiler is trying to individually compile the SDK.wiskey.c file.Harry- you need to go to the project settings and check the "Exclude File from Build" checkbox (in Visual C++ 6.0 - dunno about other compilers).That will do it.


Lefteris Kalamaras - Founder

www.flightsimlabs.com

 

sig_fsldeveloper.jpg

Share this post


Link to post
Share on other sites
Guest bartels

Yes that was also my idea several time after I posted. You don't need to exclude the subgauge.c from building, if you don't add them to the VC6 project in the first place. So add only SDK.c and SDK.rc to the project (an info I have placed here and otherwhere definetely more then a dozen times).Arne Bartels

Share this post


Link to post
Share on other sites
Guest harry3

Of course, that was the problem.What a silly question of mine...Thanks for your answers,Harry :-wave

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