Page 1 of 1

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

Posted: 04.06.2007, 22:53
by antred
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?

Posted: 04.06.2007, 23:06
by chris
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

Posted: 04.06.2007, 23:22
by antred
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?

Posted: 05.06.2007, 08:09
by t00fri
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

Posted: 05.06.2007, 12:17
by cyber_space_doc
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.