Executable cant find bin/Data file (bs::framework)

Viewed 111

Following the docs for the bs::frameworks setup tutorial. I've followed the steps as closely as I could:

  1. Created a folder: C:\dev\MyVSProjects\myProject.
  2. Created a Findbsf.cmake in myProject with the specified contents unedited.
  3. Created a CMakeLists.txt in myProject and pasted the supplied cmake code into the .txt file, but edited the set(bsf_INSTALL_DIR "C:/path/to/bsf/install"), to where ive installed bsf myself.
  4. Created a Main.cpp file in myProject with the supplied code
  5. Ran the following commands in my cmd:
    1. cd c:/dev/MyVsProjects/myProject
    2. cmake -G "Visual Studio 16 2019" -A x64

This created the myProject.sln as expected. I then build that project, which went fine, and went on to copy all the .dll files and the bin/Data file (provided by the bs framework) into folder where the myApp.exe was generated.

When I then attempt to run the project with the default content of Main.cpp I get a bunch of warnings for various .asset files:

[WARNING] Cannot load resource. Specified file: Data\Cursors\SizeWE.psd.asset doesn't exist.
     in class bs::TResourceHandle<class bs::Resource,0> __cdecl bs::Resources::load(const class bs::Path &,class bs::Flags<enum bs::ResourceLoadFlag,unsigned int>) [c:\projects\bsf\source\foundation\bsfcore\resources\bsresources.cpp:41]

Followed by an error:

[ERROR] A fatal error occurred and the program has to terminate!
  - Error: InternalErrorException
  - Description: Trying to access a resource that hasn't been loaded yet.
  - In function: void __cdecl bs::ResourceHandleBase::throwIfNotLoaded(void) const
  - In file: c:\projects\bsf\source\foundation\bsfcore\resources\bsresourcehandle.cpp:113

So it cant load the ressource at

Specified file: Data\Cursors\SizeWE.psd.asset

From myApp.exe this is exacly where that ressource is located. However im not sure what the path it then specified is reffering to:

[c:\projects\bsf\source\foundation\bsfcore\resources\bsresources.cpp:41]

This path does not exist anywhere on my disk. Im not sure where it came from, or what it relates to.

Right now im using their precompiled binaries, but ran into similar errors when trying to compile the project myself. I am not sure what to do. The docs dont make any mention of changing the Findbsf.cmake file, so I wouldent expect its contents to be the issue.

Update

The [c:\projects\bsf\source\foundation\bsfcore\resources\bsresources.cpp:41] is the path you would use if you downloaded the master branch from github. Although the content is obviously different in the precompiled binaries, that I am using. I am still not sure, from where this path is specified.

0 Answers
Related