Microsoft Visual C++ project file out of date?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
antred
Posts: 6
Joined: 15.05.2007
With us: 17 years 6 months
Location: Germanistan

Microsoft Visual C++ project file out of date?

Post #1by antred » 16.05.2007, 00:32

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.

Topic author
antred
Posts: 6
Joined: 15.05.2007
With us: 17 years 6 months
Location: Germanistan

Post #2by antred » 16.05.2007, 01:07

Yay, finally got it to work after several hours of battling compiler and linker errors! :)

Topic author
antred
Posts: 6
Joined: 15.05.2007
With us: 17 years 6 months
Location: Germanistan

Post #3by antred » 16.05.2007, 01:26

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)

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

re

Post #4by John Van Vliet » 16.05.2007, 20:12

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 "

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #5by chris » 05.06.2007, 17:00

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

Jugalator
Posts: 15
Joined: 05.07.2004
With us: 20 years 4 months
Location: Sweden
Contact:

Re: re

Post #6by Jugalator » 14.08.2007, 07:30

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.


Return to “Development”