VS2010

Aug 10, 2011 at 3:17 AM
Edited Aug 10, 2011 at 4:16 AM

Any chance you awesome fellers could give an update on how long until the projects are updated to visual studio 2010 or suggestions for it's settings?  Just started the book, looks great. Thanks much in advance.

Aug 11, 2011 at 3:36 PM
vmass20 wrote:

Any chance you awesome fellers could give an update on how long until the projects are updated to visual studio 2010 or suggestions for it's settings?  Just started the book, looks great. Thanks much in advance.

I second this, I can't seem to get any of these demos to compile.

Aug 12, 2011 at 1:14 PM

Yup - a buildable vs2010 solution would be great. BTW, excellent book!

Coordinator
Aug 12, 2011 at 8:00 PM

Hello, I tried out compiling with VS2010, and didn't get any errors (I just tried converting the solution from VS2008 to VS2010).  What kind of errors do you get on your compile?  If you are still having issues, can you also give a quick description of your setup (OS version, VS version, Boost installation version, etc...)?

I will get started setting up CMake to produce solution files for both Visual Studio versions.

- Jason Zink

Coordinator
Aug 12, 2011 at 10:14 PM

I added a page on the Documentation tab about how to convert the projects and add the include and lib directories.  After doing this, I was able to build both on Windows 7 and Windows Vista.  If you still have trouble, let me know!

The VS2010 solution and project files should be available soon too...

Aug 12, 2011 at 10:19 PM

Hello again,

You are correct that it was not difficult to properly edit the Hieroglyph3.slu file to work with vs 2010.  For those wondering, the first two lines in the header should be.  

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

Side note:  I had to add the boost and DXSDK's to each project include/lib separately.  I'm sure there is a quicker way to do link everything but that's what worked for me.

jzink, I could not get it to work while the svn didn't include the sdk files.  Now I have no problems.  Thanks again for producing the material that we learn from. 

Vince

Coordinator
Aug 12, 2011 at 10:40 PM
vmass20 wrote:

Hello again,

You are correct that it was not difficult to properly edit the Hieroglyph3.slu file to work with vs 2010.  For those wondering, the first two lines in the header should be.  

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

Side note:  I had to add the boost and DXSDK's to each project include/lib separately.  I'm sure there is a quicker way to do link everything but that's what worked for me.

jzink, I could not get it to work while the svn didn't include the sdk files.  Now I have no problems.  Thanks again for producing the material that we learn from. 

Vince

Thanks for posting your solution - I am working now to create CMake build files for the project, which will let me directly generate the appropriate solution and project files for each different development environment.  This should make it easier for people that only have one version or the other.  Sorry for the hassle...

I would also love to hear any feedback on the book once you get a chance to read through some of it!

Aug 18, 2011 at 3:19 PM
Edited Aug 18, 2011 at 3:49 PM
vmass20 wrote:

Hello again,

You are correct that it was not difficult to properly edit the Hieroglyph3.slu file to work with vs 2010.  For those wondering, the first two lines in the header should be.

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

Side note:  I had to add the boost and DXSDK's to each project include/lib separately.  I'm sure there is a quicker way to do link everything but that's what worked for me.

jzink, I could not get it to work while the svn didn't include the sdk files.  Now I have no problems.  Thanks again for producing the material that we learn from.

Vince

   Hi. In VS2010 you need to add every-time to your solutions or projects every single path of extras libraries and headers files..

Anyway you can also modify your MSBuild account's profile.
There are two way to do that:
  -The first is you need open an instance of any project or solution with VS2010, go to the propriety manager tab (near the solution explorer), select your build's profile that you need to change, and modify the Microsoft.Cpp.plataform.user.props file to add the path of libraries and headers to the VC-Dictionaries and the single static-libraries to the linker. Then when you try to close VS2010 a pop-up message will ask you to save your user settings. This is all.
  -The second (more friendly for psychotic like me : ) ), it's to manually edit the Microsoft.Cpp.plataform.user files. The Microsoft.Cpp.plataform.user.props files are modified also with the first method above, but writing it manually is more friendly for adding single object libraries... You can find those profile in "%localappdata%\Microsoft\MSBuild\v4.0", they are just single text files, you can use notepad to edit them.

The you can convert he Hieroglyph3's solution and compile it. But first, remember that you need also to recompile the lua libraries (note that you will not have different folder for different build profile, and every time you will change from "debug" to "release" or from win32 to x64 you will automatically overwrite every single file when you compile the project). When you have compiled the lua libraries with the new VC++ version, just copy them from "*\Hieroglyph3\Dependancies\lua-5.1.4\lib" into "*\Hieroglyph3\Source\Scripting\Library". Finally you can recompile all the Hieroglyph3 projects without any errors.

As example, this is my Microsoft.Cpp.Win32.user.props file:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IncludePath>C:\Libraries\boost_1_47_0;$(DXSDK_DIR)Include;$(IncludePath)</IncludePath>
    <LibraryPath>$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <Link>
      <AdditionalDependencies>d2d1.lib;d3d9.lib;d3d10.lib;d3d10_1.lib;d3d11.lib;d3dcompiler.lib;D3DCSX.lib;D3DCSXd.lib;d3dx9.lib;d3dx9d.lib;d3dx10.lib;d3dx10d.lib;d3dx11.lib;d3dx11d.lib;d3dxof.lib;dinput8.lib;dsetup.lib;dsound.lib;dwrite.lib;DxErr.lib;dxgi.lib;dxguid.lib;X3DAudio.lib;xapobase.lib;xapobased.lib;XAPOFX.lib;XInput.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
</Project>

I added the boost headers (in my pc they are under "C:\Libraries\boost_1_47_0"), the DirectX SDK headers and libraries path and I added also all the static libraries to the linker... ). Every time I open or I create a project with VS2010 the compiler and the text editor know where the boost and the directxsdk file are.. This methods also add to VS2010 more time to search into local disc and it needs more memory allocation due the files indexation..

PS: I'm apologize for my bad English.

PPS: to jzink and co.: great book! :D

Coordinator
Aug 18, 2011 at 9:05 PM

Thanks for the tips, and the compliment too - I really appreciate it. After you have had some time to go through the book, please consider writing a review on Amazon for it!

As I mentioned before, this will only be needed in the short term - once I figure out how to use CMake a little better then we should be able to generate the VS2010 files automatically.  It is progressing slower than I expected, but shouldn't be too much longer.

Coordinator
Aug 22, 2011 at 7:46 PM

After spending some time trying to get CMake set up, I have decided to begin migrating over to VS2010 and leaving VS2008 project/solution files behind.  Since the express editions of VS2010 are available, there really isn't much reason to keep the old format around.

Does anyone have any objections to this???

Coordinator
Aug 23, 2011 at 10:19 PM

In a related note, I have removed the boost dependency, which should reduce the amount of setup when switching to VS2010.  Updated solution and project files will be coming as I switch the project structure to VS2010.

Coordinator
Sep 10, 2011 at 5:18 AM

The VS2010 files have been incorporated into the repository, and I have resolved the issues with having to manually enter the property pages for each of the include directories.  Now the SDK path is referenced by the DXSDK_DIR variable, which makes the same setting apply to everyone now.  Try it out and let me know if you have any issues with it!

Sep 10, 2011 at 1:01 PM

no problems compiling the last buil (69678)