HamCoder
November 26th, 2006, 01:40 PM
Here is the error message...
APC_Moon.cpp:481: error; 'R_x was not declared in this scope'
Here is LIne 481...
e_Moon = R_x(-eps) * Vec3D(Polar(l_Moon,b_Moon));
R_x is defined in APC_VecMat3D as Mat3D R_x(double RotAngle)
e_Moon is defined in APC_Moon.cpp as Vec3D e_Moon;
Background...
I've been programming almost 40 years and I've used lots of languages on mainframe and PC/Windows platforms. But I'm new to Linux and very new to C/C++. I understand scoping, but not in the C++ context.
The program in question came on a CD as part of an astronomy book. The program calculates sunrise/sunset times. I compiled and ran it without change on my Windows box with GTK+, Glade, and something else(?). BTW, I dual-boot the hard way - by swapping one laptop drive for another.
Under Linux, I'm using Edgy 6.0, with Anjuta as the IDE. I've also gone to the terminal window and manually executed the MAKE program - with the same results I get with Anjuta.
My problem is that I'm not sure how to approach the debugging process this time. The code is moderately complex with some objects, named and unnamed namespaces.
Thanks for any help and ideas you can offer. If you want more code snippets, let me know
APC_Moon.cpp:481: error; 'R_x was not declared in this scope'
Here is LIne 481...
e_Moon = R_x(-eps) * Vec3D(Polar(l_Moon,b_Moon));
R_x is defined in APC_VecMat3D as Mat3D R_x(double RotAngle)
e_Moon is defined in APC_Moon.cpp as Vec3D e_Moon;
Background...
I've been programming almost 40 years and I've used lots of languages on mainframe and PC/Windows platforms. But I'm new to Linux and very new to C/C++. I understand scoping, but not in the C++ context.
The program in question came on a CD as part of an astronomy book. The program calculates sunrise/sunset times. I compiled and ran it without change on my Windows box with GTK+, Glade, and something else(?). BTW, I dual-boot the hard way - by swapping one laptop drive for another.
Under Linux, I'm using Edgy 6.0, with Anjuta as the IDE. I've also gone to the terminal window and manually executed the MAKE program - with the same results I get with Anjuta.
My problem is that I'm not sure how to approach the debugging process this time. The code is moderately complex with some objects, named and unnamed namespaces.
Thanks for any help and ideas you can offer. If you want more code snippets, let me know