Can't compile Celestia (as obtained via Tortoise CVS)

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

Can't compile Celestia (as obtained via Tortoise CVS)

Post #1by antred » 04.06.2007, 22:53

Hello,

A couple of weeks ago I downloaded the Celestia source code (not from the CVS repository) and, after some initial difficulties, got it to compile and run. Oh by the way, I'm using the Visual C++ 2005 Express compiler.

Tonight I finally got a CVS client installed and running and downloaded the Celestia sources from CVS. Apparently (and not surprisingly I guess), the version I got from CVS has some changes compared to the one I got from the Celestia main page a few weeks ago. Sadly some of these changes mean that my compiler is spitting out error messages and fails to compile Celestia in its current form. There are 3 seperate issues:

  1. In some places (for instance: celestia/src/celestiacelestiacore.cpp, line 1354), there are strings with just a leading underscore before them, like so:

    Code: Select all

    flash(_("Markers enabled"));


    The compiler complains: 3>c:\development\tortoisecvs\celestia\src\celestia\celestiacore.cpp(1354) : error C3861: 'gettext': identifier not found

    I compared the Celestia that I successfully compiled a few weeks back to the one I got now and it turns out that the file celestia/src/celutil/util.h has changed.

    Old version:

    Code: Select all

    #ifdef _WIN32
    #define _(s) s
    #else
    #define _(s) gettext(s)
    #endif


    New version:

    Code: Select all

    #ifdef _WIN32
    #include "libintl.h"
    #define _(string) gettext (string)
    #else
    #define _(string) gettext (string)
    #endif


    So previously the _ macro left the expression unchanged, whereas now it turns it into a call to gettext(), wnich apparently isn't defined anywhere.
  2. In celestia/src/celtutil/util.h, line 33, the file "libintl.h" is #included. This file is, however, nowhere to be found.
  3. Where ever the bind_textdomain_codeset() function (or macro?) is used, the compiler says 'identifier not found'.


Can anyone shed some light on this please? What do I need to do to sort this out?
When in danger, when in doubt, run in circles, scream and shout - source unknown

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

Post #2by chris » 04.06.2007, 23:06

You either don't have the internationalization libraries, or your missing a directory in the include path. You can get all the required libraries for building Celestia for Windows from winlibs-new: http://www.celestiaproject.net/celestia/files/winlibs-new.zip

(Note that this does not include SPICE or Lua 5.1--I need to update this package.)

Once you have the i18n libraries and include files, inc/libintl needs to be in your include path in order for Celestia.

Once you get Celestia building, would you be interested in contributing the project files? It'd be great if it were easy for people to build Celestia from the MS Visual Studio IDE.

--Chris

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

Post #3by antred » 04.06.2007, 23:22

Thanks Chris, that fixed it. :)

Chris asked
Once you get Celestia building, would you be interested in contributing the project files?


Yes, of course. How do I do it, though?
When in danger, when in doubt, run in circles, scream and shout - source unknown

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #4by t00fri » 05.06.2007, 08:09

Send it to Chris by email. Hopefully, you did not use /absolute/ directory names, since then the project files are not going to work for other directory setups...Since ~ 4 years, I use my project files for ~daily compilation of Celestia with the professional Visual Studio compiler VS++ .Net 2003.

Bye Fridger
Image

cyber_space_doc
Posts: 53
Joined: 19.03.2007
With us: 17 years 8 months
Location: united kingdom

Post #5by cyber_space_doc » 05.06.2007, 12:17

I've compiled version 1.4.1 in VC2005 by simply creating an empty project and simply throwing everything in there, including the libs.

Version 1.5.0 from CVS does compile successfully, however I get linker errors. I patched a copy of my version 1.4.1 and went through the normal problems with the libraries such as intl.lib and found that it would complain about a missing "libc.lib".

I noticed that my version 1.4.1 project had "libcd.lib" which is apparently the debug library, as one of its avoided libraries. If I avoid libc.lib I get hundereds of linker errors. If VC2005 was not used to build the winlibs then obviosuly intl.lib is the problem and it needs to be recompiled with the latest microsoft libs.
System: AMD 3200+
512Mb RAM
GeForce 7300 FX 256 mb VRAM
Windows XP Home Edition
Nforce4 Motherboard
Service Pack 2
_____________________


Return to “Development”