Page 1 of 1

Microsoft Visual C++ project file out of date?

Posted: 16.05.2007, 00:32
by antred
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.

Posted: 16.05.2007, 01:07
by antred
Yay, finally got it to work after several hours of battling compiler and linker errors! :)

Posted: 16.05.2007, 01:26
by antred
Sorry, it's probably bad form to constantly reply to myself :lol: 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)

re

Posted: 16.05.2007, 20:12
by John Van Vliet
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 "

Posted: 05.06.2007, 17:00
by chris
antred wrote:Sorry, it's probably bad form to constantly reply to myself :lol: 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

Posted: 14.08.2007, 07:30
by Jugalator
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.