Issues compiling BabylonNative on win32

I am having problems compiling BabylonNative on windows, for win32. I have installed CMake, git, Visual Studio Build Tools, g++ and python. I have followed step by step the instructions on the repo. But no executable is produced and the start command, in cmd, doesn’t work. Please help. I am kind of a noob :neutral_face: with compilers and if I don’t get a solution please send me a pre-built binary for win32 x64. For a log from my PowerShell console follow this link

People from the native team will be able to help (@bghgary for eg), but be patient as it is holidays time currently.

I can wait.

I don’t have access to the link. I’m guessing from what you are saying that you don’t have Visual Studio installed. I don’t know anyone that has tried to build with just Visual Studio Build Tools and certainly not with g++ for targeting Win32. We are expecting Visual Studio 2017/2019 using solution files.

If doing that still doesn’t work, can you paste what you are seeing in a comment?

I use in VSCode and Sublime Text in tandem for most of my development. I have visual studio build tools installed for Rust development, and g++ installed for C++ development. I don’t have Visual Studio IDE installed.
For any reference here is my, Powershell output:

PS C:\Users\user\Documents\GitHub\BabylonNative> cmake .
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.27.29112.0
-- The CXX compiler identification is MSVC 19.27.29112.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.27.0.windows.1")
-- Finding Git version for SPIRV-Cross.
-- Git hash: 3e53273c
-- Found PythonInterp: C:/Program Files/Blender Foundation/Blender/2.80/python/bin/python.exe (found suitable version "3.7", minimum required is "3")
-- Found OpenGL: opengl32
-- Enabling OpenGL support
-- Could NOT find VulkanHeaders (missing: VulkanHeaders_INCLUDE_DIR)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args`
  (VulkanRegistry) does not match the name of the calling package
  (VulkanHeaders).  This can lead to problems in calling code that expects
  `find_package` result variables (e.g., `_FOUND`) to follow a certain
  pattern.
Call Stack (most recent call first):
  Dependencies/xr/Dependencies/OpenXR-SDK/src/cmake/FindVulkanHeaders.cmake:84 (find_package_handle_standard_args)
  Dependencies/xr/Dependencies/OpenXR-SDK/src/CMakeLists.txt:57 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find VulkanRegistry (missing: VulkanRegistry_DIR)
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find JsonCpp (missing: JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY)
-- Could NOT find glslc, using precompiled .spv files
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
-- Looking for timespec_get
-- Looking for timespec_get - found
-- Found and will use pre-generated xr_generated_dispatch_table.h in source tree
-- Found and will use pre-generated xr_generated_dispatch_table.c in source tree
-- Found and will use pre-generated xr_generated_loader.hpp in source tree
-- Found and will use pre-generated xr_generated_loader.cpp in source tree
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/user/Documents/GitHub/BabylonNative
PS C:\Users\user\Documents\GitHub\BabylonNative> cmd
Microsoft Windows [Version 10.0.18363.1256]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\user\Documents\GitHub\BabylonNative>start BabylonNative.sln
The system cannot execute the specified program.

Is it possible to build BabylonNative without Visual Studio, it is on other platforms. If so can the instructions be posted on the git repo’s REDME. Would really help

I’m not sure. I’m not aware of anyone who has tried. That said, it looks like your cmake mostly succeeded. I’m not sure why it’s using OpenGL and not DirectX… something to investigate. I’m guessing cmake doesn’t generate a solution file if Visual Studio is not installed? Can you try building using cmake CLI and see what happens?

Do me a favour and please send me the prebuilt binaries for BabylonNative on win32 x64. Would be much less of a hustle than installing Visual Studio and getting set up. Also maybe add a releases directory to the repo for prebuilt binaries of BabylonNative, would really help :grin:.

We don’t have any plans to create prebuild binaries for Babylon Native as a library (static or dynamic). There are too many combinations and settings that would result in an enormous matrix, especially with the plugin architecture. We can perhaps create some prebuilt binaries for the sample Playground app so that people can quickly see what it does. Please file an issue on GitHub if you want this.

Okay just send me a prebuilt for the playground App. Off to GitHub :running_man:t6:‍♂, to file an issue.

I’m not in a state to be able to do that right now. What are you hoping to accomplish from the binary?

Test it out. Especially the perfomance.