How can I get started with the Hieroglyph3 framework?

Started by
19 comments, last by SuperSaiyan3 9 years, 4 months ago

Thank you for your interest in the book and framework - sorry it took a while for me to see this thread... If you are using VS2012, all of the pre-requisites should already be installed and ready to run. The NuGet package for DirectXTK should automatically download, or if you disabled automatic downloads you should be prompted about downloading it.

Regarding the older versions of the framework, there is information in the documentation about what commit level was released with the book. However, the book samples focus on the GPU side of the samples, so you can safely use the latest version and follow along just fine. This was done intentionally, so that the CPU side could evolve over time while still keeping the samples relevant.

When you have questions like this, it could be faster to post them in the Hieroglyph discussions forum. There have been a few other questions like this as well, so you might be able to find an answer right away too. (plus I get email notifications of new discussions, so I will see your post right away...)

EDIT: you don't have to modify any of the settings for linking or includes - all of those should already be set up relative to the project folder. Just open the Hieroglyph3_Desktop.sln file, rebuild all, and it should take off on its own. Also be sure to set the desired project as the startup project (which you can do by right clicking it and choosing "Set As Startup Project").

Advertisement

@Jason Z: I tried the last build (89332) but it does not compile with VS2013 U4. The DXTK nuget package is download ad appear to be fine, but I got LNK2019, like these on the applications' projects:


3>Hieroglyph3_Desktop.lib(RendererDX11.obj) : error LNK2019: unresolved external symbol "long __cdecl DirectX::CreateWICTextureFromMemory(struct ID3D11Device *,struct ID3D11DeviceContext *,unsigned char const *,unsigned int,struct ID3D11Resource * *,struct ID3D11ShaderResourceView * *,unsigned int)" (?CreateWICTextureFromMemory@DirectX@@YAJPAUID3D11Device@@PAUID3D11DeviceContext@@PBEIPAPAUID3D11Resource@@PAPAUID3D11ShaderResourceView@@I@Z) referenced in function "public: class std::shared_ptr<class Glyph3::ResourceProxyDX11> __thiscall Glyph3::RendererDX11::LoadTexture(void *,unsigned long)" (?LoadTexture@RendererDX11@Glyph3@@QAE?AV?$shared_ptr@VResourceProxyDX11@Glyph3@@@std@@PAXK@Z)

3>Hieroglyph3_Desktop.lib(RendererDX11.obj) : error LNK2019: unresolved external symbol "long __cdecl DirectX::CreateWICTextureFromFileEx(struct ID3D11Device *,struct ID3D11DeviceContext *,wchar_t const *,unsigned int,enum D3D11_USAGE,unsigned int,unsigned int,unsigned int,bool,struct ID3D11Resource * *,struct ID3D11ShaderResourceView * *)" (?CreateWICTextureFromFileEx@DirectX@@YAJPAUID3D11Device@@PAUID3D11DeviceContext@@PB_WIW4D3D11_USAGE@@III_NPAPAUID3D11Resource@@PAPAUID3D11ShaderResourceView@@@Z) referenced in function "public: class std::shared_ptr<class Glyph3::ResourceProxyDX11> __thiscall Glyph3::RendererDX11::LoadTexture(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,bool)" (?LoadTexture@RendererDX11@Glyph3@@QAE?AV?$shared_ptr@VResourceProxyDX11@Glyph3@@@std@@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@4@_N@Z)

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/


Right click on the Solution (in the Solution Explorer inside Visual Studio) and select Enable NuGet Package Restore. Then try building the solution again. NuGet should then automatically download any missing package, if able.

Yeah, thank you so much! I followed what you said, and after a while, I can see there is a nuget folder in the solution explorer. The problem is ... after built, it still reports errors. It says 1 succeeded, 22 failed. Since the error message is so long, I'll just copy the last few lines here:


23>f:\practical rendering and computation with d3d 11\hieroglyph3\applications\particlestorm\particlesystemactor.cpp(12): fatal error C1083: Cannot open include file: 'PCH.h': No such file or directory
23>  Generating Code...
15>  App.cpp
15>f:\practical rendering and computation with d3d 11\hieroglyph3\applications\lightprepass\app.h(10): fatal error C1083: Cannot open include file: 'RenderApplication.h': No such file or directory
15>  Generating Code...

and if I click the "Local Windows Debugger" button in the toolbox, it will generate a message:


1>F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Source\Hieroglyph3_Desktop.vcxproj(754,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.

So what's the problem? What can I do to fix it?

Some things, although seemingly beyond my reach, are never totally non-accomplishable, as long as I am strong enough!

That usually means that the Lua project built fine (since it has zero dependencies) and that the Hieroglyph3 library failed, causing all the applications to fail too. The issue is likely due to the fact that you are using VS2013, and the nuget package is installed for 2012. If you uninstall the NuGet package for VS2012 from the package manager, and then install the VS2013 version, it should probably work out for you.

I am in the process of updating to VS2013, so it shouldn't be too long before I do this update and push it to the repo.

That usually means that the Lua project built fine (since it has zero dependencies) and that the Hieroglyph3 library failed, causing all the applications to fail too. The issue is likely due to the fact that you are using VS2013, and the nuget package is installed for 2012. If you uninstall the NuGet package for VS2012 from the package manager, and then install the VS2013 version, it should probably work out for you.

I am in the process of updating to VS2013, so it shouldn't be too long before I do this update and push it to the repo.

No, I opened it with VS 2012 ultimate edition. And if I open it with VS 2013, after being built, it will report 41 errors...

So I am really looking forward to your updating to the vs 2013 edition; after all, that's the main developing environment for me.

By the way, when I open the VS 2012, it reminds me of some updates. Could that be the reason?

Some things, although seemingly beyond my reach, are never totally non-accomplishable, as long as I am strong enough!

Can you try rebuilding only the Hieroglyph 3 project and copy the errors that are reported to here? All the applications are failing to compile since the Hieroglyph 3 library isn't compiling correctly.

Can you try rebuilding only the Hieroglyph 3 project and copy the errors that are reported to here? All the applications are failing to compile since the Hieroglyph 3 library isn't compiling correctly.

OK, I selected Hieroglyph3_Desktop project in the solution explorer, right-clicked it and selected "Rebuild", and the error message is as follows:


1>------ Rebuild All started: Project: LuaLib, Configuration: Debug Win32 ------
1>  lzio.c
1>  lvm.c
1>  lundump.c
1>  ltm.c
1>  ltablib.c
1>  ltable.c
1>  lstrlib.c
1>  lstring.c
1>  lstate.c
1>  lparser.c
1>  loslib.c
1>  lopcodes.c
1>  lobject.c
1>  loadlib.c
1>  lmem.c
1>  lmathlib.c
1>  llex.c
1>  liolib.c
1>  linit.c
1>  lgc.c
1>  Generating Code...
1>  Compiling...
1>  lfunc.c
1>  ldump.c
1>  ldo.c
1>  ldebug.c
1>  ldblib.c
1>  lcode.c
1>  lbaselib.c
1>  lauxlib.c
1>  lapi.c
1>  Generating Code...
1>  LuaLib.vcxproj -> F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Dependencies\lua-5.1.4\LuaLib\Bin\Win32\Debug\LuaLib.lib
2>------ Rebuild All started: Project: Hieroglyph3_Desktop, Configuration: Debug Win32 ------
2>F:\Practical Rendering and Computation with D3D 11\Hieroglyph3\Source\Hieroglyph3_Desktop.vcxproj(754,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\directxtk.2.22.13.23\build\native\directxtk.targets.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Some things, although seemingly beyond my reach, are never totally non-accomplishable, as long as I am strong enough!

That is strange - if you have enabled the NuGet package restoring, and it is downloading for you, then I don't know why it wouldn't be working. Perhaps if you opened it with VS2013 first, then it may have changed the NuGet package references during the project upgrade. Can you please download a fresh copy of the source and make sure you open it only with VS2012, enable the NuGet package restore, and then rebuild all?

That is strange - if you have enabled the NuGet package restoring, and it is downloading for you, then I don't know why it wouldn't be working. Perhaps if you opened it with VS2013 first, then it may have changed the NuGet package references during the project upgrade. Can you please download a fresh copy of the source and make sure you open it only with VS2012, enable the NuGet package restore, and then rebuild all?

Yeah, I did what you said. But everything remains the same. I found that in the Hieroglyph3 folder, there will be a subfolder named .nuget after the restoring, and it contains three files:

an XML Configuration File, an executable named NuGet, and NuGet.targets.

Is that all right? If not, what shall I do?

Some things, although seemingly beyond my reach, are never totally non-accomplishable, as long as I am strong enough!

That isn't what I have. I have a 'packages' folder in Hieroglyph3, and inside of that is a separate folder with the directxtk package and folder. For some reason your NuGet isn't functioning properly (or at least how I would expect it to work).

This topic is closed to new replies.

Advertisement