Anyone successfully compiled Celestia on Windows with MinGW?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Miserableman
Posts: 65
Joined: 03.04.2002
With us: 22 years 3 months
Location: Brighton, England
Contact:

Anyone successfully compiled Celestia on Windows with MinGW?

Post #1by Miserableman » 08.11.2005, 00:15

Hi all,

I'm having another go at tinkering with Celestia. This time I'm trying to compile it using the Code::Blocks IDE and the MinGW compiler. I may be a novice but it's been a bloody nightmare, to put it bluntly, and it still doesn't work. I've encountered numerous problems on the way, some of which have required tinkering with the code in Celestia - obviously this is no good, as soon as I did a CVS fetch I'd have to reapply all my workarounds. It's far more likely that I'm doing something wrong than there being bugs in the code, so has anyone got Celestia to compile on Windows with the MinGW compiler? Painlessly, if possible?

The specific problem I'm stuck on at the moment is in the main Celestia.exe project, in winstarbrowser.cpp on line 190:

Code: Select all

celestia\winstarbrowser.cpp: In function `std::vector<const Star*, std::allocator<const Star*> >* FindStars(const StarDatabase&, Pred, int)':
celestia\winstarbrowser.cpp:190: error: expected `;' before "iter"

Here is the offending line of code (the first line is where the error is flagged):

Code: Select all

for (StarSet::const_iterator iter = firstStars.begin();
         iter != firstStars.end(); iter++)

I'm not sure what it's complaining about, StarSet is typedef'd earlier in the function on line 156:

Code: Select all

typedef multiset<const Star*, Pred> StarSet;

Anyone have any idea what this could be about?

I would post a summary of all the other problems I've been having but it's late and there are too many of them to remember/write down right now :0( If I ever get Celestia to compile with MinGW I will start again with a fresh codebase and document the workarounds I had to put in.

steffens
Posts: 162
Joined: 06.11.2003
With us: 20 years 8 months
Location: RP Germany

Re: Anyone successfully compiled Celestia on Windows with Mi

Post #2by steffens » 08.11.2005, 08:56

Miserableman wrote:I've encountered numerous problems on the way, some of which have required tinkering with the code in Celestia - obviously this is no good, as soon as I did a CVS fetch I'd have to reapply all my workarounds.

If you change files in your local copy of the CVS repository, you do not need to reapply all changes after a "CVS fetch". Just do a "cvs update", and your local copy will be synched with the repository while preserving your changes. Only a "cvs checkout" will retrieve a fresh copy.

I'm sorry that I cannot help you with your compile problems as my C++ coding skills are minimal and I do know nothing about MinGW. The line you posted looked OK to me. Perhaps you might post some more lines before the line where the error occurs. Maybe there is some syntax error before, that will confuse the compiler.

steffens

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 10 months

re

Post #3by John Van Vliet » 10.11.2005, 23:44

insted of MinGW there is avalible a free cmd compiler from Micro soft
i have only used visual stuido on win xp and gcc4 on linux

try cominting out the line and see if it builds or gives more errors
also there is a dl on my site that includes all the win headders and libs neadded to build with nmake
http://johnscelestiapage.no-ip.com/file ... php?lid=26


Return to “Development”