Page 1 of 1

Celestia-1.4.0pre-FT1.1 -With gcc4.0.1 It Works!!!

Posted: 18.10.2005, 06:10
by John Van Vliet
hi all i though i would start a new thread
I found a sloution to getting ft 1.1 to build with gcc4.0.1 on fedora4
it seems that template<> needs to be stated in the function ( see changlog for gcc4)

For staroctree.cpp starting at line 64

Code: Select all

// In testing, changing SPLIT_THRESHOLD from 100 to 50 nearly
// doubled the number of nodes in the tree, but provided only between a
// 0 to 5 percent frame rate improvement.
template<>
unsigned int                                     DynamicStarOctree::SPLIT_THRESHOLD     = 75;
template<>
DynamicStarOctree::LimitingFactorPredicate*      DynamicStarOctree::limitingFactorPredicate = starAbsoluteMagnitudePredicate;
template<>
DynamicStarOctree::StraddlingPredicate*          DynamicStarOctree::straddlingPredicate = starOrbitStraddlesNodesPredicate;
template<>
DynamicStarOctree::ExclusionFactorDecayFunction* DynamicStarOctree::decayFunction       = starAbsoluteMagnitudeDecayFunction;



and the same goes for dsooctree.cpp starting at line 58

Code: Select all


template <>
unsigned int                                    DynamicDSOOctree::SPLIT_THRESHOLD         = 10;
template <>
DynamicDSOOctree::LimitingFactorPredicate*      DynamicDSOOctree::limitingFactorPredicate = dsoAbsoluteMagnitudePredicate;
template <>
DynamicDSOOctree::StraddlingPredicate*          DynamicDSOOctree::straddlingPredicate = dsoStraddlesNodesPredicate;
template <>
DynamicDSOOctree::ExclusionFactorDecayFunction* DynamicDSOOctree::decayFunction       = dsoAbsoluteMagnitudeDecayFunction;


// total specialization of the Stat


so far i have only tested this in fedora 4 -gnome
but i will be testing in visual studio.net in a few minites

Posted: 18.10.2005, 07:27
by Boux
Yes, it compiles flawlessly under gcc 4.0.1 under Linux after doing the Toti's and others' <template> trick.
This has been known and proven several days ago (see main thread FT 1.1).

re

Posted: 18.10.2005, 08:47
by John Van Vliet
yes i found that out right after i posted this .It would have saved some time,but it dose feel good to have solved this puzzle on my own .