Page 1 of 1

Windows build environment?

Posted: 27.12.2005, 10:47
by faethon
I'm trying to build Celestia from CVS on windows. I have tried different compiler configurations, starting with the Visual C++ Toolkit 2003 and Platform SDK as pointed out in the sticky from Paolo. After some fiddling about, I have been able to compile and build all the libraries, however, with the final link of the celestia executable I get many unresolved external symbols, which may be caused by incompatible libraries.

I have then tried building celestia using the newer Visual C++ 2005 Express Edition (free from Microsoft) however, also to no avail.

After that I tried building celestia with an older Visual Studio 6 (VC98) version I had lying around, however, also here the building was not successful in the final link of the celestia executable.

I'm still trying to get this thing build on windows, since I would like to maybe add new features, but am first to setup a good building environment on windows. My question therefore is: which building environment do you use? Which compiler? And what version?

PS. I'm new to celestia but very impressed!!

Re: Windows build environment?

Posted: 27.12.2005, 12:52
by t00fri
faethon wrote:I'm trying to build Celestia from CVS on windows. I have tried different compiler configurations, starting with the Visual C++ Toolkit 2003 and Platform SDK as pointed out in the sticky from Paolo. After some fiddling about, I have been able to compile and build all the libraries, however, with the final link of the celestia executable I get many unresolved external symbols, which may be caused by incompatible libraries.

I have then tried building celestia using the newer Visual C++ 2005 Express Edition (free from Microsoft) however, also to no avail.

After that I tried building celestia with an older Visual Studio 6 (VC98) version I had lying around, however, also here the building was not successful in the final link of the celestia executable.

I'm still trying to get this thing build on windows, since I would like to maybe add new features, but am first to setup a good building environment on windows. My question therefore is: which building environment do you use? Which compiler? And what version?

PS. I'm new to celestia but very impressed!!


If you have some programming background, I don't understand , why you use so many different environments. If you configure anyone of them correctly, building simply works fine ;-)

I regularly compile CVS e.g. with the Visual C++ Toolkit 2003. It's quite easy for people with some expertise (which you must have if you plan to add modifications to the code).

An even easier way, might be to simply download my Celestia-FT1.2 source code release

http://www.celestiaproject.net/~t00fri/celesti ... 1.2.tar.gz

There you have all required lib's, dll's and includes and all the project files for the Visual C++ Toolkit 2003. You should be able to manage without efforts to slightly modify these files to the current CVS configuration. Just copy all the needed files over.

The FT1.2 release you should be able to build just after starting the GUI compiler environment.

Bye Fridger

Posted: 27.12.2005, 12:53
by selden
You're probably missing the Windows-specific shared libraries that aren't included with Celestia on SourcForge. http://celestiaproject.net/celestia/files/winlibs-new.zip

I also suspect you haven't read the stickies at the top of this (Development) forum about developing Celestia under Windows.

Posted: 27.12.2005, 18:50
by faethon
Thanks for your replies. I have been able to compile Celestia now, using visual studio .NET 2003.

Posted: 28.12.2005, 18:05
by GlobeMaker
Hello faethon,

Please post the celvars.bat type of environmentals that you used successfully. Are there any notes you can share here about getting this standard setup to work? Did you correct a LIB pathname? What was the cause of the link failure seen by several people?

Posted: 28.12.2005, 20:11
by t00fri
GlobeMaker wrote:Hello faethon,

Please post the celvars.bat type of environmentals that you used successfully. Are there any notes you can share here about getting this standard setup to work? Did you correct a LIB pathname? What was the cause of the link failure seen by several people?


In Visual C++ Toolkit 2003 there is no such file (celvars.bat). There are simply a number of dialogs where you enter the various library directories relative to the project root and the loaction of the Celestia executable. Typically the dll's reside in the celestia root directory and in addition, there is a lib directory and an inc directory also in celestia root.. It's straightforward to specify their position relative to the project root. I can only recommend again to use my project files from FT1.2 as a guideline for Visual C++ Toolkit 2003.

Bye Fridger

Posted: 28.12.2005, 23:16
by GlobeMaker
OK, it compiles, now. Here are some notes on
first-time compiling of Celestia on Windows XP.

Note 1
Follow the forum instructions, including second level
improvements posted to the thread. Importantly, the
SDK has 13 big files (25 meg each) to download, and
two small ones. This link was the one that worked

http://www.microsoft.com/msdownload/pla ... k-full.htm

The old description of menus to get the SDK is wrong.
The old links lead me to mistakenly
download a smaller 2 meg "Platform SDK file". And that
blocked progress. That was deleted and the 13
files were loaded with names like PSDK-FULL.13.cab


Note 2
After all the SDK and C++ Toolkit 2003 were in place,
another stumbling block presented itself. Two missing files
were called MSVCR70.dll and MSVCR80.dll. I found them
in the SDK and copied them to
C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin

Note 3
The compiler failed two more times, calling for odbc32.lib and
odbccp32.lib . These did not exist on my computer. I loaded
an old compiler to get those files. The old compiler is called
Microsoft Visual C++ 6.0 Standard Edition from 1998.
When those files were copied into the
C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib
directory, the compilation succeeded.


Note 4
Here is the environmental file called celvars.bat :
@echo off

Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%

Set INCLUDE=C:\Program Files\Microsoft SDK\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft SDK\Lib;%LIB%
Set INCLUDE=C:\Program Files\Microsoft SDK\include\Win64\mfc;%INCLUDE%
Set LIB=C:\Program Files\Microsoft SDK\Lib\IA64\mfc;%LIB%

Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include;%INCLUDE%
Set INCLUDE=c:\CVS2\celestia\inc;%INCLUDE%

Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;%PATH%

Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
Set LIB=C:\CVS2\celestia\lib;%LIB%

It compiled Celestia 1.4.0 correctly.
I started the program and the Earth loomed large.
Acceleration was applied, and stars parted before me.
Thanks to Chris, Selden, the doctors, the masters,
the bachelors, the coeds, and the eds of the community!

Posted: 30.12.2005, 16:23
by faethon
Globemaker,

I got it compiled and linked eventually with a fresh install of Visual Studio .NET 2003, which I have access to from work. It looks promising that you got it to work with the free tools available from MS. I guess I got stuck with the odbc libraries you manually copied over. Maybe your info should go into the sticky on building the free windows build environment. Good work!