GameFoundry / bsfExamples

Example projects for the bs::framework
MIT License
63 stars 24 forks source link

Issues building (Win 10 VS2017) #1

Open iontom opened 6 years ago

iontom commented 6 years ago

I'm relatively novice in C++, so this may be a failure on my end. I followed the instructions to the T and was able to build the SLN file in the Build folder using CMake - but after that, when I try to build any of the projects, they fail at every #include.

Am I missing an implied step? Some config option? (Using x64 Release)

Thanks, your engine is awesome!

iontom commented 6 years ago
-- Looking for bsf installation...
-- ...Cannot find include file "bsfCore/BsCorePrerequisites.h" at path C:/Users/ionto/source/repos/bsfExamples/Dependencies/bsf/include
-- ...Cannot find imported library: bsf bsf_LIBRARY-NOTFOUND
-- ...Cannot find imported library: bsfPhysX bsfPhysX_LIBRARY-NOTFOUND
-- ...Cannot find imported library: bsfRenderBeast bsfRenderBeast_LIBRARY-NOTFOUND
-- ...Cannot find imported library: bsfSL bsfSL_LIBRARY-NOTFOUND
CMake Warning at Source/CMake/Findbsf.cmake:68 (message):
  Cannot find bsf installation.  Try modifying the bsf_INSTALL_DIR path.

So I know I'm supposed to be referencing the bsf repository to build the examples. However I think there's something slightly off about finding the right path.

I'm reading through Findbsf.cmake and also looking on CMAKLists.txt trying to change set (BSF_SOURCE_DIR ${PROJECT_SOURCE_DIR}/Source) to something which should find my bsf git folder. Both my bsf and bsfexamples are in the same repos folder, so I've tried relative path of ../bsf/Source but something still isn't sticking.

I'm also not sure if there is supposed to be a dependencies folder in bsfExamples, or if that would auto-generate if the bsf path was correctly being found. Maybe including bsf as a sub-repository in this examples repo would help get the pathing straight.

Thanks man! I'll post on here if I figure it out on my own.

iontom commented 6 years ago

Okay, I wasn't trying your latest push. After I synced it DID build, but the executables in the bin/x64/Release folder fail when opening. Here's the error:

Unhandled exception at 0x00007FFADBA9F322 (bsf.dll) in ExampleLowLevelRendering.exe: 0xC0000005: Access violation reading location 0x0000000000000000. occurred

BearishSun commented 6 years ago

Could try deleting your build folder running cmake from scratch? Or at least forcing a rebuild in VS? I made some changes recently that should resolve all issues - I'm able to run the examples properly on my end. If the problem persists let me know and we can go from there.