Comments (9)
Got it working. There were missing pieces in pre-processor
Wonderful to hear that!
from luisacompute.
Build LC via
python bootstrap.py cmake -f dx -b
Did cmake --install .
in build dir afterwards
Created a new c++ project in VS2022 and added include directory from installs. Also switched to C++20 standards
from luisacompute.
Hi, @trsh
Directly including the installed directory in VS may lose some of the compile options and definitions we defined in the CMake build system. Therefore, you will have to manually add these missing definitions and options.
Here I collect some:
Compile Definitions:
#define _ENABLE_EXTENDED_ALIGNED_STORAGE 1
#define _CRT_SECURE_NO_WARNINGS 1
#define _UNICODE 1
#define LUISA_PLATFORM_WINDOWS 1
#define FMT_CONSTEVAL constexpr // missing of this causes the fmt error in this issue
#define FMT_EXCEPTIONS 0
#define FMT_HEADER_ONLY 1
#define FMT_USE_NOEXCEPT 1
#define XXH_INLINE_ALL 1
Compile Options:
/Zc:preprocessor
/Zc:__cplusplus
Additional definition if you enable the dsl
feature when building:
#define LUISA_ENABLE_DSL 1
And for the gui
feature:
#define LUISA_ENABLE_GUI 1
#define GLFW_INCLUDE_NONE 1
You may configure them in the VS project settings.
An alternative solution is to use CMake as your build system and add the LuisaCompute
project directory (not the installed directory) as a subdirectory, so these configurations will be automatically propagated for you.
That said, maybe we should automatically generate a config header when installing to support other build systems. I will open an issue to track this need.
from luisacompute.
@Mike-Leo-Smith with these added now I only have problems with dsl
/sugar
from luisacompute.
Ahh I messed up with the preprocessor, now I have only 1 error:
Severity Code Description Project File Line Suppression State Details
Error C4996 'luisa::compute::Printer': The frontend-implemented `Printer` is deprecated in favor of the backend-implemented built-in function. Please use `device_log()` from <luisa/dsl/builtin.h>. Lu C:\Program Files\LuisaCompute\include\luisa\dsl\printer.h 143
from luisacompute.
Ahh I messed up with the preprocessor, now I have only 1 error:
Severity Code Description Project File Line Suppression State Details Error C4996 'luisa::compute::Printer': The frontend-implemented `Printer` is deprecated in favor of the backend-implemented built-in function. Please use `device_log()` from <luisa/dsl/builtin.h>. Lu C:\Program Files\LuisaCompute\include\luisa\dsl\printer.h 143
Looks like the deprecated
warning is being treated as an error. Maybe adding a /wd4996
flag to the VS project settings will help?
from luisacompute.
@Mike-Leo-Smith yes, I just suppressed the warning, now I am down to linking libs.
Took it from reference, but smth is missing. Need to debug it properly
lc-vstl.lib
Shlwapi.lib
lc-osl.lib
lc-gui.lib
lc-dsl.lib
lc-api.lib
lc-runtime.lib
lc-ir.lib
luisa_compute_ir_static.lib
kernel32.lib
advapi32.lib
bcrypt.lib
ntdll.lib
userenv.lib
ws2_32.lib
lc-ir-v2.lib
lc-ast.lib
lc-core.lib
dbghelp.lib
lc-ext-stb.lib
lc-ext-imgui.lib
lc-ext-glfwdll.lib
lc-ext-eastl.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
from luisacompute.
Got it working. There were missing pieces in pre-processor
from luisacompute.
I'm closing this issue since it's tracked in #118
from luisacompute.
Related Issues (20)
- Open Shading Language to LuisaCompute AST translator HOT 1
- CPU backend shared memory emulation via LLVM coroutine
- Build (linking) error on macOS Ventura 13.5.2 Apple M2 HOT 10
- Support offset and size in texture copy commands
- test_denoiser crash with DX backend HOT 2
- Vulkan / HIP backend(s) HOT 5
- Minimal cross platform example for blit to screen HOT 2
- Export `luisa-config.h` for other build systems than CMake
- Better error handling when RTX support is not supported
- Simple lambda causes LESBAR HOT 2
- default variable initialization codegen wrong in loop scope HOT 1
- Motion Blur Support HOT 1
- ImageView.copy_from() crashes with specific resolution HOT 1
- Should TLAS accept primitives only? HOT 1
- Incorrect Buffer copy_from and copy_to on CPU/DX and possibly Metal backends
- Vulkan support? HOT 2
- Runtime dynamic size array/list/vector of arbitrary type in callable/kernel HOT 2
- python confusing behavior due to implicit casting HOT 2
- Pass values between RT shaders with OptiX's built-in registers rather than local memory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luisacompute.