Jonathan Polley
writes:
Although SimGear is now building under MSVC (thanks).
MSVC also does not like having constants defined in a class (net_fdm.hxx and raw_ctrls.hxx).
static const int FG_MAX_ENGINES = 4;
static const int FG_MAX_WHEELS = 3;
static const int FG_MAX_TANKS = 2;
When I used the recommended, and I apologize for not remembering by whom, change to
enum {FG_MAX_TANKS = 2,
FG_MAX_WHEELS = 3,
FG_MAX_ENGINES = 4,
};
it compiles, links, and runs just fine.I believe that all that is needed is to declare the variablesoutside of the class declaration with file scpeie in the header -- foo.hxx
class foo {
static const int a:
}
and then in the C file - foo.cxx - somthing like this should work
const int foo::a = 5;
Norman
