Other ways to support Sylphis3D...
I'm going to start a thread here with my woes of compiling, until I get this thing done.
I'm bombing at a Linker stage (final solution below)
Linking...
Creating library d:\sylphis3d\sylphis\trunk\runtime\src\sylphis\\..\..\sylphis.lib and object d:\sylphis3d\sylphis\trunk\runtime\src\sylphis\\..\..\sylphis.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
main.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function __catch$_WinMain@16$0
libode_d.lib(error.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
renderingviewwin32.obj : error LNK2019: unresolved external symbol __imp__SetPixelFormat@12 referenced in function "protected: int __thiscall CRenderingViewWin32::SetupPixelFormat(struct HDC__ *)" (?SetupPixelFormat@CRenderingViewWin32@@IAEHPAUHDC__@@@Z)
renderingviewwin32.obj : error LNK2019: unresolved external symbol __imp__ChoosePixelFormat@8 referenced in function "protected: int __thiscall CRenderingViewWin32::SetupPixelFormat(struct HDC__ *)" (?SetupPixelFormat@CRenderingViewWin32@@IAEHPAUHDC__@@@Z)
renderingviewwin32.obj : error LNK2019: unresolved external s
...
[bla bla bla ba bla]
Build log was saved at "file://d:\sylphis3d\sylphis\trunk\runtime\src\sylphis\Debug\BuildLog.htm"
sylphis - 29 error(s), 320 warning(s)
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now, everyone's links (including the one from Ogre's wiki) to the page on configuring MFC properly is broken; it just goes to the markety-looking Express page. So I dug into VC++ Express's help files. Here's the tweaks you have to make to the product to get it to integrate properly with MFC:
[b]From the Online Help for VC++[/b]
You can use Visual C++ 2005 Express Edition to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express Edition to build Win32 applications, you will need to take just a few more steps, as detailed below.
Installing the Platform SDK for use with Visual C++ Express Edition
Install the Microsoft Platform SDK over the Web from the Platform SDK Update site. At a minimum, you will need to install the Windows Core SDK. However, several samples utilize the functionality in other SDKs, so it is recommended that you perform a complete install.
From the Tools menu in Visual Studio, select Options. The Options dialog box appears.
From the Options dialog box, expand the Projects and Solutions node and select VC++ Directories. In that section, add the following paths to the appropriate subsection:
Executable files: C:\Program Files\Microsoft SDK\Bin
Include files: C:\Program Files\Microsoft SDK\include
Library files: C:\Program Files\Microsoft SDK\lib
Note
The location of the Platform SDK might be different on your system.
Update the corewin_express.vsprops file (found in %VSINSTALLDIR%\VC\VCProjectDefaults) and change the string that reads:
AdditionalDependencies="kernel32.lib"
to:
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Update the default.js file (found in %VSINSTALLDIR%\VC\VCWizards\AppWiz\Generic\Application\scripts\1033) and change the two lines that read:
LinkTool.AdditionalDependencies = "kernel32.lib $(NoInherit)";
to:
// LinkTool.AdditionalDependencies = "kernel32.lib $(NoInherit)";
To integrate the Platform SDK documentation into the Visual C++ Express documentation, follow the instructions at Visual Studio 2005 Express Edition Combined Help Collection Manager.
Generate and build a Win32 application to test your paths.
For this, you can use one of the many samples provided in the Help files, such as CPUID Sample: Determines CPU Capabilities. To verify that everything is working, build and run the sample as documented in the help topic.
Another linker error (but successful link)
There's a linking conflict between the default and "other libs", which suggests turning on a flag somewhere:
Linking...
...
d:\sylphis3d\sylphis\trunk\runtime\src\sylphis\\..\..\sylphis.lib and object d:\sylphis3d\sylphis\trunk\runtime\src\sylphis\\..\..\sylphis.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Does anyone know in VC++ where I add build flags?
Thanks for pointing out the
Thanks for pointing out the dead URL. Fortunately, the page the old URL links to has a nice link right up top the page to the instructions: http://msdn2.microsoft.com/en-us/express/aa700755.aspx
I'll get back in and fix the link in the documentation.
-=Derek