Open3DMotionGroup / Open3DMotion

Other
5 stars 2 forks source link

Compiler errors for Open3DMotionTest #4

Closed Alzathar closed 11 years ago

Alzathar commented 11 years ago

Under MacOS 10.5.8 with GCC 4.0, I'm not able to compile Open3DMotionTest. I have the following errors:

File Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp

<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp: In member function ‘void TestForceCalculator::testAMTI12Channel()’:
<root>/Open3DMotion/Biomechanics/Algorithms/ForceCalculator.h:35: error: ‘bool Open3DMotion::ForceCalculator::SetModel(const Open3DMotion::ForcePlate&)’ is protected
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp:66: error: within this context
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp: At global scope:
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp:85: error: ‘TestForceCalculator’ was not declared in this scope
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp:85: error: template argument 1 is invalid
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp:85: error: invalid type in declaration before ‘;’ token
<root>/Open3DMotionTest/Biomechanics/Algorithms/TestForceCalculator.cpp:85: warning: ‘autoRegisterRegistry__85’ defined but not used

File Open3DMotionTest/MotionFile/TestMoXie.cpp

<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:69: error: ‘TestMoXie’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:69: error: template argument 1 is invalid
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:69: error: invalid type in declaration before ‘;’ token
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:71: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testLoad()’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:73: error: ‘testNWalk02File’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:76: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testExtractFileName()’:
<root>/Open3DMotion/MotionFile/Formats/MoXie/FileFormatMoXie.h:46: error: ‘static void Open3DMotion::FileFormatMoXie::ExtractFileName(std::string&, const std::string&)’ is protected
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:79: error: within this context
<root>/Open3DMotion/MotionFile/Formats/MoXie/FileFormatMoXie.h:46: error: ‘static void Open3DMotion::FileFormatMoXie::ExtractFileName(std::string&, const std::string&)’ is protected
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:83: error: within this context
<root>/Open3DMotion/MotionFile/Formats/MoXie/FileFormatMoXie.h:46: error: ‘static void Open3DMotion::FileFormatMoXie::ExtractFileName(std::string&, const std::string&)’ is protected
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:87: error: within this context
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:91: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testReWriteMoXie()’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:98: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:110: error: ‘testNWalk02File’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:113: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testTrialAttributes()’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:130: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:142: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:166: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testForceConversion()’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:172: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:190: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:208: error: ‘ComputeForce’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:226: error: ‘CompareTS’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:230: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void testNWalk02File(const char*)’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:236: error: ‘handler’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:300: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: In function ‘void CompareTS(const Open3DMotion::TimeSequence&, const Open3DMotion::TimeSequence&, const char*, double, Open3DMotion::TSVector3ConstIter*)’:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:321: error: ‘CompareFrameElement’ was not declared in this scope
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp: At global scope:
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:325: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:337: error: ‘TestMoXie’ has not been declared
<root>/Open3DMotionTest/MotionFile/TestMoXie.cpp:69: warning: ‘autoRegisterRegistry__69’ defined but not used

If I remove these two files, then I'm able to compile Open3DMotionTest.

drjrm commented 11 years ago

It looks like this is because of a problem using GCC 4.0 with global-scope friend classes. We've attempted a fix at:

https://github.com/Open3DMotionGroup/Open3DMotion/commit/19497a055fa12f51b2185ebca9881b25824467c1

Alzathar commented 11 years ago

Your commit 19497a055fa12f51b2185ebca9881b25824467c1 fix this issue. Thanks.