Open starlightany opened 6 months ago
We have not completed our cmake support yet. You can try configure cmake with presets, e.g.
cmake --preset default
Or please refer to our build instructions to use premake to generate the project files.
All examples need to be run with work directory set to where the same path as their main.cpp file.
On windows, the build process is:
To run an example, e.g. set the current work directory to the main.cpp file of that example, and run the project from visual studio.
ok, thank you.
I have already tried compiling with
cmake --preset default
,
but it seems that due to some incomplete compilation configurations, it cannot correctly compile the executable file for the example. That's why I went to check the CMakeLists.txt to see if it can be compiled correctly.
Since that's the case, I will try again using premake.
Hi, On Windows 11, x64, using Ninja, and MSVC
Recently, I've been trying to run examples from slang, but encountered numerous issues.
Firstly, there's a compilation issue. If you want to compile the examples, you need to manually add
--target all-examples
to the compilation command. Additionally, after compilation, I realized the actual execution path for the code is under./slang
, so it's unable to find the corresponding .slang files. I had no choice but to move all the shaders that needed to be executed to the outermost./slang
directory. At this point, the target example was able to run, but there were still some problems.Also, when running the "hello world" example, I encountered the following error:
Moreover, for projects that utilize gfx, it seems like nothing is actually being rendered. I checked the source code and found that something seems to fail during creation without returning an error. After debugging, I believe the error code encountered is as shown in the following image:
I'm not entirely sure if the issue lies with my method of compilation or the way I'm running it.