Hello all,
I'm new to Celestia (discovered it a few days ago) and am currently taking a shot at compiling it under Microsoft Visual C++ 2005 Express. I downloaded the source code from the Celestia page ... not from the CVS repository (is this a problem?).
Anyway, I converted the VC++ 6.0 workspace / project files into a VC++ 2005 solution and then took it from there. Basically what happened is that I got about 70 linker errors ... unresolved symbols mostly stemming from the fact that not all cpps are actually contained in the various Celestia subprojects. I added them myself and this seems to have resolved those linker errors. Also the celengine project contained one file ./octree.cpp that doesn't actually exist. I take it it probably did exist at some point in the past but was removed ... only no one remembered to update the VC++ 6.0 projects to account for it?
Yeah, basically I just want to ask if my suspicion is correct (namely that the MS VC++ project file is out of date) or if I'm just doing something wrong.
Microsoft Visual C++ project file out of date?
Sorry, it's probably bad form to constantly reply to myself but I just ran the program in the debugger and immediately after startup and spinning Earth around a little bit the program asserted (vector index out of bounds) in samporbit.cpp in SampledOrbit::computePosition(). The following line was the culprit:
Probably should be:
Code: Select all
/* Here, n was 5339 but the samples vector only had a size of 5339 elements. Thus, samples[n] would be accessing a non-existent, 5340th element! */
if (n < 1 || jd < samples[n - 1].t || jd > samples[n].t)
Probably should be:
Code: Select all
if (n < 1 || jd < samples[ n - 2 ].t || jd > samples[ n - 1 ].t)
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months
re
a few years back i was building it on visual studio .net 2002 . OH BOY what fun that was . however after the first successful build ( after 2 mo.) building from cvs was easy just small edits
but i decided to kick the MS habit and went to fedora Linux
but windows and V.S. 2002 are still installed on a dif HD
visual studio is ,let's just say " FUN "
but i decided to kick the MS habit and went to fedora Linux
but windows and V.S. 2002 are still installed on a dif HD
visual studio is ,let's just say " FUN "
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
antred wrote:Sorry, it's probably bad form to constantly reply to myself but I just ran the program in the debugger and immediately after startup and spinning Earth around a little bit the program asserted (vector index out of bounds) in samporbit.cpp in SampledOrbit::computePosition(). The following line was the culprit:Code: Select all
/* Here, n was 5339 but the samples vector only had a size of 5339 elements. Thus, samples[n] would be accessing a non-existent, 5340th element! */
if (n < 1 || jd < samples[n - 1].t || jd > samples[n].t)
Probably should be:Code: Select all
if (n < 1 || jd < samples[ n - 2 ].t || jd > samples[ n - 1 ].t)
This is definitely a bug--I'm glad that you noticed it. I've committed the fix to CVS (though it's different than what you have.)
--Chris
Re: re
john Van Vliet wrote:a few years back i was building it on visual studio .net 2002 . OH BOY what fun that was . however after the first successful build ( after 2 mo.) building from cvs was easy just small edits
but i decided to kick the MS habit and went to fedora Linux
but windows and V.S. 2002 are still installed on a dif HD
visual studio is ,let's just say " FUN "
Especially VS 2002... :/ VS 2003 did a lot to standard compliance, and VS 2005 even moreso. VS 2002 was also that hackjob to get their .NET compiler out in time I guess. :p I wouldn't even recommend that IDE to my enemy.