Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation with VS2022 on Windows10 #1

Open
chaosink opened this issue Sep 14, 2022 · 0 comments
Open

Compilation with VS2022 on Windows10 #1

chaosink opened this issue Sep 14, 2022 · 0 comments

Comments

@chaosink
Copy link

After a few tries, I got a successful compilation and run on Windows10.
Write the steps here which may be helpful to others.

  • The C++ source code of the manifolds project requires C++17. Add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") to line 24 of <path_to_project>\CMakeLists.txt.
  • Though C++17 is used, MSVC still cannot handle some code of the nanogui-python-obj project. We need Clang to compile it.
  • Add #define STB_IMAGE_IMPLEMENTATION before line 41 of <path_to_project>\ext\nanogui\src\example1.cpp.
    • We can skip this step because the example1 project is not required actually. It's only an example of nanogui.
  • Now the compilation should pass. Next, run the application.
  • Move <path_to_project>\build\ext\nanogui\Release\nanogui.cp39-win_amd64.pyd to its upper directory.
  • Set the environment variable
    • Powershell: $env:PYTHONPATH="<path_to_project>\build\Release;<path_to_project>\build\ext\nanogui\Release;$env:PYTHONPATH"
    • Command Prompt: set PYTHONPATH="<path_to_project>\build\Release;<path_to_project>\build\ext\nanogui\Release;%PYTHONPATH%"
  • python <path_to_project>/python/viewer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant