I created a solution that builds and runs in Visual Studio 2
Posted: 04.11.2010, 20:08
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 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.