• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX What is WRONG WITH ME!

Messages
57
Country
unitedstates
Hi guys,

I am using the new VS11 beta (although this has been tried with VS2010 as well), and I cannot for the life of me get the code to work. It tells me the gaugehdr data is undefined, despite having the appropriate #define information. The code I think will be helpful has been included, please make sure to ask me if I have left something crucial out of my examples. If there is a setting in the IDE or an actual code mistake, please let me know. I haven't figured my way around the FSX/C++ environment quite yet.

in 737clx.cpp (my master source file)
------------------------------------
#include "inc\gauges.h"

#define GAUGE_NAME "info\0"
#define GUAGEHDR_VAR_NAME gaugehdr_info
#define GAUGE_W 100

#include "info.cpp"

GAUGE_TABLE_BEGIN()
GAUGE_TABLE_ENTRY(&gaugehdr_info)
GAUGE_TABLE_END()
--------------------------------------

I appreciate anyone's help,
 
:confused:Never done any kind of codeing:confused::confused: that looks like a buch of jumbled letters and numbers to me... maybe if u rearranged them a bit it might work:rolleyes::p
 
Hi guys,

I am using the new VS11 beta (although this has been tried with VS2010 as well), and I cannot for the life of me get the code to work. It tells me the gaugehdr data is undefined, despite having the appropriate #define information. The code I think will be helpful has been included, please make sure to ask me if I have left something crucial out of my examples. If there is a setting in the IDE or an actual code mistake, please let me know. I haven't figured my way around the FSX/C++ environment quite yet.

in 737clx.cpp (my master source file)
------------------------------------
#include "inc\gauges.h"

#define GAUGE_NAME "info\0"
#define GUAGEHDR_VAR_NAME gaugehdr_info
#define GAUGE_W 100

#include "info.cpp"

GAUGE_TABLE_BEGIN()
GAUGE_TABLE_ENTRY(&gaugehdr_info)
GAUGE_TABLE_END()
--------------------------------------

I appreciate anyone's help,

Spelling mistakes are a real nightmare:eek:

Also you don't need "\0" in the name, null terminator is implicit.

Tom
 
Could you please post the complete error message? Would be important to know what is the compiler telling exactly.

Tom
 
New Code (737clx.cpp)
---------------------

#include "inc\gauges.h"
#include "737clx.h"

#define GAUGE_NAME "737clx_about"
#define GAUGEHDR_VAR_NAME gaugehdr_about
#define GAUGE_W 38

#include "gauges\737clx.about.cpp"

GAUGE_TABLE_BEGIN()
GAUGE_TABLE_ENTRY(&gaugehdr_about)
GAUGE_TABLE_END()
-------------------------------
Compiler Error: error C2065: 'gaugehdr_about' : undeclared identifier
 
I meaned the complete error code; that includes source file and line number where the error happens.

Thanks

Tom
 
Error 1 error C2065: 'gaugehdr_about' : undeclared identifier c:\users\collin\documents\visual studio 11\projects\737clx\737clx\737clx.cpp 11
 
Error 1 error C2065: 'gaugehdr_about' : undeclared identifier c:\users\collin\documents\visual studio 11\projects\737clx\737clx\737clx.cpp 11

Ok thanks, the error comes from here:

GAUGE_TABLE_ENTRY(&gaugehdr_about)

Then, either gaugehdr_about macro is not properly coded in 737clx.about.cpp, or could be also a compiling issue. Are you using a makefile in your project?

Tom
 
I am not not using a makefile, I am using the dll compilation method (with /NOENTRY, Multithread debug selected, and the libcmt library excluded).
 
I am not not using a makefile, I am using the dll compilation method (with /NOENTRY, Multithread debug selected, and the libcmt library excluded).

Well, I do use makefile projects and are very simple to config, though I can't tell whether it is a better method than the one you're using. However, I suspect that the problem may be in 737clx.about.cpp. Could you post the entire .cpp? (either directly or in .zip format).

Tom

EDIT:

In 737clx.about.cpp you must declare any of these macros for the gauge to compile:

GAUGE_HEADER_FS700
GAUGE_HEADER_FS800
GAUGE_HEADER_FS900
GAUGE_HEADER_FS1000

(Actually 700 is the same as 800)
 
Last edited:
Ok, two things in 737clx_about.cpp:

1) Comment the #include "inc\\gauges.h" line, as it is already included in 737clx.cpp

2) Check this macro GAUGE_HEADER_FS700(GAUGE_W, about_gauge_name, &about_list, about_mouse_list, 0, 0, 0) , it needs 8 parameters and you have 7 here.

Tom
 
I have excluded the 737clx_aboux.cpp from the project in VS, and I am now ready to compile, but I got LNK2001 and LNK1120 errors (posted below), I am researching now.

---------
Error 3 error LNK1120: 2 unresolved externals C:\Users\Collin\Documents\Visual Studio 11\Projects\737clx\Debug\737clx.dll 1
Error 1 error LNK2001: unresolved external symbol "struct ELEMENT_HEADER * about_list" (?about_list@@3PAUELEMENT_HEADER@@A) C:\Users\Collin\Documents\Visual Studio 11\Projects\737clx\737clx\737clx.obj
Error 2 error LNK2001: unresolved external symbol "struct MOUSERECT * about_mouse_list" (?about_mouse_list@@3PAUMOUSERECT@@A) C:\Users\Collin\Documents\Visual Studio 11\Projects\737clx\737clx\737clx.obj
---------
 
The linker errors were a result of the mouse_rect not being used. I will get a little further in the code so the externals resolve. Other than those two errors, all the other errors are gone. Thank you greatly Tom!
 
Back
Top