Patapom/GodComplex

Build/run errors - Test HBIL

clayjohn opened this issue · 3 comments

Hi, I recently tried building the HBIL sample after seeing you had updated to VS2019, I unfortunately have not been able to get it running. First because of build errors (which I believe I figured out how to fix) and second because of a runtime error).

Build errors
When building the tests.sln project I receive the following build errors

C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Containers\SpatialHashing.h(395,48): error C2039: 'one': is not a member of 'bfloat3'
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Math\Math.h(100): message : see declaration of 'bfloat3'
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Containers\SpatialHashing.h(398,48): error C2039: 'one': is not a member of 'bfloat3'
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Math\Math.h(100): message : see declaration of 'bfloat3'
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Containers\SpatialHashing.h(418,16): error C3861: 'idMath': identifier not found
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Containers\SpatialHashing.h(419,16): error C3861: 'idMath': identifier not found
C:\Users\Clay\dev\GodComplex\Packages\BaseLib\Containers\SpatialHashing.h(420,16): error C3861: 'idMath': identifier not found

I can compile the HBIL project by changing one to One (for the first 2 errors) and commenting out the lines for the other 3 errors.

That appears to work, but I don't know the impact of the SpatialHashing file on the project overall.

Making these changes allows me to successfully build the TestHBIL.exe however, when I run it (from within VS2019) I receive a run time error.

Run time error

Upon running through VS2019 I receive the following error:

System.IO.FileNotFoundException: 'Could not load file or assembly 'Renderer.dll' or one of its dependencies. The specified module could not be found.'

What makes the error confusing is that both TestHBIL.exe and Renderer.dll are located in the same folder (in this case, GodComplex/build/Debug). I have tried copying all the dlls and exes into GodComplex/Tests/TestHBIL, but I have the same issue.

I am wondering if there is VS2019 setting that I have not set, or if there is something else wrong that is causing these errors.

To confirm, I followed the steps in https://github.com/Patapom/GodComplex/tree/master/Tests/TestHBIL including setting the working directory to GodComplex/Tests/TestHBIL and I am still unable to run the project.

If I run the exe directly from the command line or file manager nothing happens at all.

I am really hopeful there is an easy fix here as I would love to run the project on my machine.

Hi, sorry to hear that.
For the compilation issues, I guess I committed changes that fixed that. SpatialHashing is not used in the HBIL demo anyway.

Regarding the runtime error, you can check the dependencies on Renderer.dll by opening it with "depends.exe" (a version that supports CLI anyway, you can find some around on the web (I guess I'm using https://www.dependencywalker.com/ but really not sure)) but I would bet it's probably either missing the shader compiler "d3dcompiler_47.dll" or the "FreeImage.dll" (or "FreeImageD.dll" if you're running the debug version).

Hope that helps?

Thank you for responding! I ran renderer.dll through a dependency walker (https://github.com/lucasg/Dependencies) and indeed the issue was that it needed FreeImageD.dll and I only had FreeImage.dll available.

It works now! Thanks again.

Great! 👍