Compiling celestia 1.2.4

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
LionAM

Compiling celestia 1.2.4

Post #1by LionAM » 26.05.2002, 19:55

Hello!
I tried to compile Celestia, but don't know how to do it.
I wanted to use C++ Builder 4, but could not find a Project (bpr) and a form; so I tried to use Visual C++ 6.0. But there is a problem with the include files: The compiler doesn't find files in another folder, e.g. from the file stardb.h it can't find <celengine/constellation.h>
What make I wrong?

Thanks!

MB

Post #2by MB » 28.05.2002, 06:57

I understand your problem since I am not at all an expert in programming and I had to spend some time before compiling the code without any help.
I just can suggest my experience. I had some experience with "Borland" IDE but they do not seem at first glance appropriate to compile "celestia".
With MSDEV 6.0
1: Open the appropriate "workspace" Celestia.dsw
in \celestia124\celestia-1.2.4\src
2:
You have to incorporate the necessary graphics libraries . For this purpose,
in Tools -> Options -> Directories With "Show directories for ..."include files"
by double clicking three times to add the include include libraries with the correct path
e.g. D:\CELESTIA\CELESTIA124\CELESTIA-1.2.4\NEW_LIB\INC\LIBJPEG
D:\CELESTIA\CELESTIA124\CELESTIA-1.2.4\NEW_LIB\INC\LIBPNG
D:\CELESTIA\CELESTIA124\CELESTIA-1.2.4\NEW_LIB\INC\LIBZ

3: in Tools -> Options -> Directories With Show directories for ..."Library files"
by double clicking to add the include libraries
e.g. D:\CELESTIA\CELESTIA124\CELESTIA-1.2.4\NEW_LIB\LIB

4: in Build -> Set Active Configuration choose "Celestia Win32 Release" This will put the compiled .exe in the right directory. Except if you want to Debug ...............

I found the necessary *.lib, *.h and *.dll files has been found at the "Chris" URL.

During few weeks this URL was put in the "download" page of the "Celestia" URL. I don't find it again. If you don't succeed I can send you a copy as attached files, it is not very big (few 100K).

Good luck!

MB

Topic author
LionAM

Post #3by LionAM » 29.05.2002, 13:40

Hello!
Thank you for your answer.
I noticed that I had not these files. Now I found LIBPNG, LIBJPEG and LIBZ-Files at http://enchantia.com/software/graphapp/download/ (I hope these are the right ones), but there are no *.lib-files.
In addition to that is the include-file unistd.h missing, which is included in some source-files of celestia.
But the worst problem is that I can't open celestia.dsw, when I try it, nothing happens; I can't save it because it is not open and I can't choose "Set Active Configuration". When I open my own test.dsw from a new project, everything works fine.

Topic author
LionAM

Post #4by LionAM » 29.05.2002, 15:16

Could the problem perhabs be because I use a german version of Visual C++?

MB

Post #5by MB » 29.05.2002, 15:31

1. I can't understand that you are not able to open the Celestia .dsw workspace. Just after launching MSDEV6, nothing is open, then you go: File -> OpenWorkspace-> that open the directory tree allowing chosing the rigth "path" to Celestia .dsw. thats all??
2. Your question concerning unistd.h brings me to another question: how you create your workspace (that include several "projects")??
Actually the source code package celestia.1_2_4.tar.gz ( I hope you use this package!) is utilized for both the "Windows" and "Linux" version (at least) of celestia. The unistd.h header is only used for the linux version (gtkmain.cpp or glutmain.cpp) . The "Celestia.dsw" workspace take care of that and select only the files necessary to the Windows version.

3. You really need the .lib files of the graphics libraries. They will be required at the" link" step.

MB

Guest

Post #6by Guest » 29.05.2002, 15:34

Although I am french I use an English version I don't think that come from that.
MB

Topic author
LionAM

Post #7by LionAM » 31.05.2002, 09:07

Hello MB!
I think the problem could be that I have a German version of Visual C++, because the .dsw-files look different.
The German version in german notepad:
Image

Celestia.dsw in German notepad:
Image

The difference is that a German newline is 0A0Dh and an English newline is just 0Ah in Hexedit.
When I open celestia.dsw, nothing happens and I don't have access to most of the menus. It seems to me it is not open.
test.dsw I created this way: Datei(File)->Neu...(New...)->Projekte(Projects?)->Win32-Anwendung(Win32-Application)->Projektname(Name of project?)=test->Eine leere Anwendung(An empty application?)
As source code package I use celestia-1.2.4.tar.gz, did you mean this with "celestia.1_2_4.tar.gz"?

Guest

Post #8by Guest » 31.05.2002, 10:23

This is not related to German or English versions. It is due to the different line-ending conventions in UNIX versus DOS/WINDOWS... systems.

#0A = line feed
#0D = carriage return

In DOS-type files you use #0A #0D
while in UNIX-type files you use simply #0A.

People working on both systems usually have tools to convert from one to the other.

If you send me your file by email, I do it for you.

Bye Fridger

MBnotepad copy of the cel

Post #9by MBnotepad copy of the cel » 31.05.2002, 10:23

1. Concenning the name of the package, I don't know the origin of the slightly different writing but I don't think it is important. In any case, after expending the package the right directory appears with the name written as you show with the . instead of the _.

2. More important : you perfectly right, I created a test.dsw workspace which looks identical to yours under notepad. But contrarily to your case "my" celestia .dsw appears correctly under notepad.
The different ASCII coding with the 0D0Ah or OAh is known to be a problem between Mac OS , Windows and UNIX. But I am surprised that it was also different between countries!! In that case complain to Bill Gate!!

I could send you a copy of "my" celestia .dsw notepad, may be you can "edit" (even if it is not recommended!) . But I don't know how to post it (I use Nescape 6) Tell me!
MB

Guest

Post #10by Guest » 31.05.2002, 10:26

Just after posting this note, I see the post of Friger, you should be saved.

Topic author
LionAM

Post #11by LionAM » 01.06.2002, 07:00

Hello!
Thanks for your information, I can always learn new things. I tried to edit manually, replacing the newlines, but then Visual C++ noticed it and an error occured; but it didn't ignore that I tried to open it, like in the original version.
I put the file celestia.dsw online:
http://people.freenet.de/ti-86-asm/Celestia.dsw (In Internet Explorer it shows correctly.)
My e-mail-address is LionAM@gmx.de.

To MB: What do you want post? If you want to put it online, you need a bit webspace.
Alex.


Return to “Development”