Selden,
I have made a description of what and how I've changed the compiler- directives for building of Celestia with the IDE version of VS.net
It's a long story but here it is:
Step by step I'll explain the changes in settings of the compiler directives for VC++ 7.0 IDE version:
If you're able to build Celestia properly with the VC++ 6.0 compiler you can convert the workspace into a solution for the .net version but you still have to change some directives.
After you have installed the VS.net application right-click on the file Celestia.dsw, choose "Open with Visual Studio.net" . The VS.net program starts and will tell you that you have to convert this workspace into a so called solution. Click on the "Yes" button for all the projects within Celestia. The VS.net program starts in debug-mode.
On the menu choose "Build" followed by "Configuration Manager", set the Active Solution Configuration to "Release". Set all the projects of this Solution to "Release" as well.
Close the Configuration Manager.
On the rightside of your screen you should see a small pane called "Solution Explorer" if not select on the menu "View" followed by "Solution Explorer". Select in the Explorer "Celestia".
Below this small pane you'll see a property pane with four buttons on top of it. Click on the most right button.(Property Pages) or select in the menu "Project" followed by "Properties".
A window pops-up where you can change or set the configuration for the compiler.
In a attemp to avoid questions afterwards I'll give the settings for each relevant part, not an explanation in what it does (click "help" on each setting if you want to know more about it).
General:
Output directory: .\release
Intermediate Directory: .\release
Project Defaults:
Configuration Type: Application(.exe)
Build Browser Information: No
Use of MFC: Use Standard Windows Libraries
Use of ATL: No use of ATL
Minimize CRT use in ATL: No
Character set: Use Multi-Byte Character set
Use Managed Extension: No
Whole Program Optimization: No
C/C++
General:
Additional Include Directories: ..; ..\..\inc\libjpeg; ..\..\inc\libpng; ..\..\inc\libz
Resolve #using Reference:
Debug Information Format: Disabled
Compile as Managed: Not using managed extensions
Suppres Startup Banner: Yes(/nologo)
Warning Level: Level3(/W3)
Detect 64-bit Portability Issues: No
Treat Warnings As Errors: No
Optimization:
Optimization: Maximum Speed(/O2)
Global Optimization: No
Inline Function Expansion: Disable (was default at /Ob1)
Enable intrinsic Functions: No
Floating Point Consistency: Default Consistency
Favor Size or Speed: Neither
Omit Frame Pointers: No
Enable Fiber-safe Optimization: No
Optimize For Processor: Blended
Optimize for Windows Application: No
Preprocessor
Preprocessor Defenitions: WIN32; NDEBUG; _WINDOWS; WINVER=0X0400; _WIN32_WINNT=0X0400 (after click on the button[...] at the right of this line an editor appears."Inherit from project default" must be checked and in the screen "Inherited Values" should mention: _MBCS)
Ignore Standard Include Path: No
Generate Preprocessed File: No
Keep Comments: No
Code Generation
Enable String Pooling: No (Was /GF by default)
Enable Minimal Rebuild: No
Enable C++ Exceptions: Yes(/EHsc) (is the same as /GX)
Smaller Type Check: No
Basic Runtime Checks: Default
Runtime Library: Single-threaded(/ML)
Struct Member Alignement; Default
Buffer Security Check: No
Enable Function Level Linking: No (was /Gy by default)
Language: All Items set to "No".
Precompiled Header
Create/Use Precompiled Header: Automatically Generate(/YX)
Create/Use PCH Trough File: Clear this line (was stdafx.h)
Precompiled Header File: .\Release/Celestia.pch
Output Files
Expand Attrbuted Source: No
Assembler Output: No Listing
ASM Listing Location: Clear this line
Object file Name: .\Release/
Program Database file Name: .\Release/
Browse Information
Enable Browse Information: None
Browse File:
Advanced
Calling convention: __cdecl(/Gd)
Compile As: Default
Disable Specific Warnings:
Force Includes:
Force #using:
Show Includes: No
Undefine Preprocessor Definitions:
Undefine All Preprocessor Definitions: No
Command Line
The command line look like this:
/O2 /I ".." /I "..\..\inc\libjpeg" /I "..\..\inc\libpng" /I "..\..\inc\libz" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINVER=0x0400" /D _WIN32_WINNT=0x0400" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/Celestia.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Linker
General
Output File: .\release/Celestia.exe
Show Progress: Not Set
Version:
Enable Incremental Linking: No(INCREMENTAL:NO)
Suppres Startup Banner: Yes(/NOLOGO)
Ignore Import Library: No
Register Output: No
Additional Library directories: .; ..\..\lib; ..\cel3ds\Release; ..\celengine\Release; ..\celmath\Release; ..\celtxf\Release; ..\celutil\Release
Input
Additional Dependencies: comctl32.lib opengl32.lib glu32.lib winmm.lib libjpeg.lib libpng1.lib zlib.lib cel-3ds.lib cel_engine.lib cel_math.lib cel_txf.lib cel_util.lib vfw32.lib
Ignore All Default Libraries: No
All other item are not filled in.
Debug
Generate Debug Info: No
Generate Program Database File: .\Release\Celestia.pdb
Strip Private Symbols:
Generate Map File: No
Map File Name:
Map exports: No
Map lines: No
System
Subsystem: Windows(/SUBSYSTEM:WINDOWS)
Heap reserve size: 0
Heap Commit Size: 0
Stack Reserve Size: 0
Stack Commit Size: 0
Enable Large Addresses: Default
Terminal Server: default
Swap Run From CD: No
Swap Run From Network: No
Optimization
References: default
Enable COMDAT Folding: Default
Optimize for Windows98: Default
Function Order:
Embedded IDL
MIDL Commands:
Ignore Embedded IDL: No
Merged IDL Base File Name:
Type Library
TypeLib Resource ID: 1
Advanced
Entry Point:
Resource Only DLL: No
Set Checksum: No
Base Address:
Turn Off Assembly Generation: No
Delay Loaded DLL: Don't Support Unload
Import Library:
Merge sections:
Target Machine: Not Set
Command Line
The command line look like this:
/OUT:".\Release/Celestia.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"." /LIBPATH:"..\..\lib" /LIBPATH:"..\cel3ds\Release" /LIBPATH:"..\celengine\Release" /LIBPATH:"..\celmath\Release" /LIBPATH:"..\celtxf\Release" /LIBPATH:"..\celutil\Release" /PDB:".\Release/Celestia.pdb" /SUBSYSTEM:WINDOWS comctl32.lib opengl32.lib glu32.lib Winmm.lib libjpeg.lib libpng1.lib zlib.lib cel_3ds.lib cel_engine.lib cel_math.lib cel_txf.lib cel_util.lib vfw32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Additional Options: /MACHINE:I386
Resources
General
Preprocessor definitions: NDEBUG
Culture: English(US)(0x0409)
Additional Include Directories:
Ignore Standard Include Path: No
Show Progress: No
Resource File Name:$(IntDir)/$(InputName).res
Command Line:
The commandline look like this:
/d "NDEBUG" /l 0x409 /fo".\Release/Celestia.res"
All other settings for MIDL,Browse Information, Build Event etc. can be left as it is.
The directives for the other projects (cel3ds, celengine, celmath, celtxf, celutil) has to be set as well. Except for some directories or libraries they look the same as above.
I will show the command lines only, with the above you must be able to achieve the proper settings.
Cel3ds:
/O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/cel3ds.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Celengine:
/O2 /I ".." /I "..\..\inc\libjpeg" /I "..\..\inc\libpng" /I "..\..\inc\libz" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/celengine.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Celmath:
/O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/celmath.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Celtxf:
/O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/celtxf.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Celutil:
/O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINVER=0x0400" /D "_WIN32_WINNT=0x0400" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/celutil.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
To integrate the CELX feature into IDE you have to do the following:
Select project "Celestia" and open "Property Pages". Goto C/C++ tab/ general. Open the editor([...]-key) of the "Additional Include Directories".Goto the end of the list and add: ..\..\inclua
Select the Preprocessor-tab, open the editor of the Preprcessor Definitions. Add on the end of the list: CELX
The commandline of the C/C++-tab look like this:
/O2 /I ".." /I "..\..\inc\libjpeg" /I "..\..\inc\libpng" /I
"..\..\inc\lua" /I "..\..\inc\libz" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WINVER=0x0400" /D "_WIN32_WINNT=0x0400"
/D "CELX" /D "_MBCS" /FD /EHsc /ML /YX /Fp".\Release/Celestia.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c
Select now the "Linker"-tab and choose Input / "Additional Dependencies". Open the editor and add on the end of the list: lua.lib and Lualib.lib
The commandline of the Linker look like this:
/OUT:".\Release/Celestia.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"." /LIBPATH:"..\..\lib" /LIBPATH:"..\cel3ds\Release" /LIBPATH:"..\celengine\Release" /LIBPATH:"..\celmath\Release" /LIBPATH:"..\celtxf\Release" /LIBPATH:"..\celutil\Release" /PDB:".\Release/Celestia.pdb" /SUBSYSTEM:WINDOWS comctl32.lib opengl32.lib glu32.lib Winmm.lib libjpeg.lib libpng1.lib zlib.lib
lua.lib lualib.lib cel_3ds.lib cel_engine.lib cel_math.lib cel_txf.lib cel_util.lib vfw32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Confirm the modifications on the property pages and close this window.
Right-click in the Solution Explorer on the Source Files of project"Celestia", choose "Add" and "Add Existing Item" Select on the list of Source files: celx.cpp
Do the same for the Header Files with celx.h
Recompile the solution. At the end no errors should appear but unfortunatly 79 warnings.
Note: There is one compiler directive which is set automatically by default( /c) and one remains undocumented (/FD)in this version.
With the above settings the directory stucture of the Source Code must look like this:
\src(the Celestia Source Code)
\lib(the libraries)
\inc(the include files)
You can find the latest(winlibs-new.zip) Libraries and the Include files at:
http://ennui.celestiaproject.net/celestia/files
Hopefully this contribution clears some doubts about the IDE version of Visual Studio.