Hi,
I have Visual Studio 2010 (not express), running on Windows 7 64bit. Unlike ajtribick’s experience in April, Celestia would not compile and run for me without a bit of effort. I had to make a new solution and project from scratch.
To get it to work, I had to rebuild new versions of zlib and libpng that did not use the “Microsoft Visual C++ 2008 Redistributable”. I actually used libpng 150 beta 53 because it was the only one with working project files. Once that was all figured out, the only untidy bits are the use of “Build Events” and “Custom Build” steps to copy the executable and dlls into the project directory.
Is anyone interested in taking a look?
I added to following to the Celestia/Development/Win32 platform wiki page:
http://en.wikibooks.org/wiki/Celestia/D ... 2_platform
Please comment/edit:
VS2010
Currently, there is no Visual Studio 2010 solution checked into the subversion repository. If you have VS2010, you will have several unsupported steps to perform, in addition to the steps outlined for previous versions of Visual Studio.
* First, VS2010 will convert the previous version's project files into VS2010 format. These converted versions will have mismatching $(TargetFile) and linker output file definitions. These will have to be manually reconciled. One choice is to set the General project property "Target Name" to "$(ProjectName)" and the linker property "Output File" to "$(OutDir)$(TargetName)$(TargetExt)". This will allow you to build, but it will not run.
* Second, and most significantly, the static libraries zlib and libpng in the repository are compiled to work only with the redistributable runtime dlls for VS2008, namely msvcm90.dll, msvcp90.dll and msvcr90.dll. These runtimes are incompatible with VS2010, so you will have to obtain zlib and libpng (and the debug versions) that will run with 2010. The easiest way to do this may be to grab the sources from sourceforge, build them yourself, put the new libs in windows\lib\x86, and change the entries in the linker's "Additional Dependencies" property.
* Finally, you must ensure that the celestia.exe and the dlls in windows\dll are copied into $(ProjectDir), and that the Debugging "Command" property is set to "$(ProjectDir)\$(TargetFileName)" and the "Working Directory" property is set to $(ProjectDir).
There may be other steps to perform, depending upon the versions of zlib and libpng that you obtain.
I created a solution that builds and runs in Visual Studio 2
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: I created a solution that builds and runs in Visual Stud
I am building Celestia with VS2010 Express since quite a while without any problems on a 64bit Window 7 system. Moreover I also built the latest Qt-version in SVN for Windows 7 in 32bit mode with the latest Qt 4.7.0 and QtCreator 2.01 IDE without problems. Same under OpenSuSE 11.3 Linux. All is stable and easy.
But it is crucial to distinguish between a x64 build and a conventional 32bit build (which may be chosen in VS2010 Express unlike VS2008 Express!) Compiling Celestia in 32bit on a 64bit Windows 7 installation with VS2010 Express worked at the first try for me. No essential changes are required in VS2010 compared to VS2008 on Win XP 32bit. Of course the various path macros you also mentioned need some trivial adjustments after the project file has been automatically translated from VS2008 to VS2010 standard.
What is potentially far less trivial is to attempt a true 64bit build of Celestia! Besides a 64bit rebuilding of the external libs, the code of Celestia will surely require a number of not quite trivial modifications.
Fridger
But it is crucial to distinguish between a x64 build and a conventional 32bit build (which may be chosen in VS2010 Express unlike VS2008 Express!) Compiling Celestia in 32bit on a 64bit Windows 7 installation with VS2010 Express worked at the first try for me. No essential changes are required in VS2010 compared to VS2008 on Win XP 32bit. Of course the various path macros you also mentioned need some trivial adjustments after the project file has been automatically translated from VS2008 to VS2010 standard.
What is potentially far less trivial is to attempt a true 64bit build of Celestia! Besides a 64bit rebuilding of the external libs, the code of Celestia will surely require a number of not quite trivial modifications.
Fridger
Last edited by t00fri on 05.11.2010, 00:05, edited 1 time in total.
Re: I created a solution that builds and runs in Visual Stud
I had been building on 2008 Express Edition prior to migrating to 2010. Whether that had any influence on the build process I don't know. The Windows version I use is 32-bit WinXP (and that is my secondary operating system, I usually use 64-bit Xubuntu), I have neither experience nor access to 64-bit Windows at the present time.
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months