Closed momo773510 closed 2 months ago
Hi @momo773510
Does it build correctly if you use the terminal (i.e cmake --build build --config Release
) instead of opening the .sln
file ?
Everything including python extension runs well in this way, a lot thanks! Maybe that's a VS solution detecting problem.
Summary
VS solution of python extension couldn't be generated correctly and caused compile error
System configuration
System information:
OS: Win11 23H2 Python version: 3.11.4 Mitsuba version: 3.5.2 Compiled with: VS2022 Variants compiled: "scalar_rgb", "llvm_mono", "llvm_spectral_polarized", "cuda_ad_spectral", "cuda_ad_mono"
Description
Following the tutorial given by the documentation, after running the cmake generation command, the mitsuba.conf file will be generated and it should be configured to compile variants wanted. However when open the
mitsuba.sln
withmitsuba.conf
configured, the variants showed in solution explorer/python isn't complete and lack some corresponding items. You can see the absence ofllvm_mono_ext
and other extensions of variants. Direct compile will lead to hundreds of errors and most of them are "unresolved external symbol", while they all occur inmitsuba_some_variant_ext
andmitsuba_stub_file_generation
:In the end of compilation VS will tell that the external file changes(
mitsuba.conf
?) of solution are checked, and remind to reload the solution. After reloading, the solution items of missing variants will appear and now it needs a recompile(but it wastes a lot of time), then the python interface is available. If not, using themitsuba.exe
to render isn't influenced by the error but the python interface isn't available:mi.variants()
will print the correct output whilemi.set_variants
telling that "some_variant not found" because the python extension of that variants hasn't been generated.I wonder that either it's a VS problem or I miss some key points in the tutorial. Now I choose to manually interrupt the generation at the beginning of compile and then VS will give a tip of reload solution. Is there some solution that after configure the
mitsuba.conf
VS can inspect the change immediately and generate correct solutions of wanted variants? Thanks.