I'm digging into JSBSim for a project I have using OpenEaagles (OE is the framework, JSBSim is used to do the dynamics heavy lifting). There's some changes that I'm trying to make to JSBSim, and I got it to compile static libraries without any changes. However, using the newly compiled libraries is resulting in a null pointer error during initialization. I have 15 objects that get created(FCS will be an example), and if I print out the pointer, it is pointing at something created by the "new" call. If I use the get functions on the very next line, 4 are null pointers and two point to different memory locations. I checked the spelling in the get functions and they're correct. I'm using VC++2010. What would cause this problem?
code snippet:
code snippet:
Code:
class FGDMExec
{
public:
FGDMExec();
...
inline FGFCS* GetFCS(void) {return FCS;}
...
private:
...
FGFCS* FCS;
Code:
FGDMExec::FGDMExec()
{
...
FCS = new FGFCS(this);
...
cout<<...FCS... //returns a value
cout<<...GetFCS()... //returns 0
}