Code Monkey home page Code Monkey logo

Comments (16)

fire avatar fire commented on May 16, 2024 2

This is sufficiently difficult that making release builds for windows might be a good idea.

from coacd.

fire avatar fire commented on May 16, 2024 2

I am unable to compile for windows.

from coacd.

fire avatar fire commented on May 16, 2024 2
vcpkg install openvdb:x64-windows
git clone --recursive https://github.com/yetigit/CoACD.git
cd CoACD
git fetch origin master
git checkout master
mkdir build
cd build
$env:CMAKE_TOOLCHAIN_FILE="C:\Users\ernes\scoop\apps\vcpkg\current\scripts\buildsystems\vcpkg.cmake"
cmake .. -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release
.\CoACD.sln and build the coacdapp

Work in progress

Need to force 64bit OpenVDB

coacd_RelWithDebInfo.zip

Estimated took an hour to fix the vcpkg problems.

from coacd.

yetigit avatar yetigit commented on May 16, 2024 1

Hi thank you for the suggestions. Our code was mainly tested on Linux, have you tried using WSL to run the code on Windows?

i'm sure it compiles fine on linux but a native windows build would be more than welcome for this fantastic library

from coacd.

yetigit avatar yetigit commented on May 16, 2024 1

I am unable to compile for windows.

@fire please use my fork https://github.com/yetigit/CoACD and checkout to master to build on windows.

git clone --recursive https://github.com/yetigit/CoACD.git
git fetch origin master
git checkout master

and use vcpkg with cmake.

example of using the app :
coacdapp.exe -i chair.obj -o chairout.obj -np -mn 10 -t 0.4 -c 4

the parameter -np is needed to speed things up if you are sure you have a watertight manifold mesh
the new parameter -c (max number of convex hulls) is super useful.


The problem we had here on windows :

  • is the namespace pollution. there was a dozen of using namespace std in broad scope headers (this was the biggest problem and I had to go in there and manually prepend std:: to everything for hours).
  • couple of incorrect includes
  • dependencies not referenced in the cmake file
  • unneeded instructions in the cmake file

@SarahWeiii i am not familiar with collaborating using forks and I have some other work to do but do consider the changes I made on my fork, on master https://github.com/yetigit/CoACD and maybe let's try to merge it later, cheerios

from coacd.

SarahWeiii avatar SarahWeiii commented on May 16, 2024 1

Thank you @fire @yetigit for the effort of compiling CoACD on Windows! @yetigit you could simply send a pull request to me and I can merge the code into the main branch.

from coacd.

Shayp277 avatar Shayp277 commented on May 16, 2024 1

Hi everyone,
I've been struggeling for couple of days now to try and run coacd on windows with no success.

when I "pip install coacd" the installation is complete but then when I try to import it I get:

PS C:\Users\shayp> & C:/Users/shayp/AppData/Local/Microsoft/WindowsApps/python3.10.exe c:/Users/shayp/Desktop/Untitled-1.py
Traceback (most recent call last):
File "C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd_init_.py", line 19, in
lib = ctypes.CDLL(os.path.join(os.path.dirname(file), "lib_coacd.so"))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes_init
.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd\lib_coacd.so' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Users\shayp\Desktop\Untitled-1.py", line 1, in
import coacd
File "C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd_init_.py", line 21, in
lib = ctypes.CDLL(os.path.join(os.path.dirname(file), "lib_coacd.dll"))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes_init
.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd\lib_coacd.dll' (or one of its dependencies). Try using the full path with constructor syntax.

from coacd.

Shayp277 avatar Shayp277 commented on May 16, 2024 1

Hi, reinstalled the coacd and now its the 0.0.4 version.
Guess I tried before the package was updated in the pypi.
Now everything works great!
thank you very much for this awesome library and quick response :)

from coacd.

fire avatar fire commented on May 16, 2024

Newer instructions that are failing

  1. use msys
  2. pacman -S mingw-w64-x86_64-boost mingw-w64-x86_64-openvdb mingw-w64-x86_64-spdlog cmake ninja
  3. git clone https://github.com/SarahWeiii/CoACD.git
  4. cd CoACD
  5. mkdir -p build
  6. cd build
  7. cmake .. -GNinja

from coacd.

fire avatar fire commented on May 16, 2024

Some errors:

src/btConvexHull/btAlignedAllocator.cpp:71:31: error: cast from 'char*' to 'long unsigned int' loses precision [-fpermissive]
   71 |         offset = (alignment - (unsigned long)(real + sizeof(void*))) & (alignment - 1);

from coacd.

SarahWeiii avatar SarahWeiii commented on May 16, 2024

Hi thank you for the suggestions. Our code was mainly tested on Linux, have you tried using WSL to run the code on Windows?

from coacd.

Shayp277 avatar Shayp277 commented on May 16, 2024

Hi everyone, I've been struggeling for couple of days now to try and run coacd on windows with no success.

when I "pip install coacd" the installation is complete but then when I try to import it I get:

PS C:\Users\shayp> & C:/Users/shayp/AppData/Local/Microsoft/WindowsApps/python3.10.exe c:/Users/shayp/Desktop/Untitled-1.py Traceback (most recent call last): File "C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd__init__.py", line 19, in lib = ctypes.CDLL(os.path.join(os.path.dirname(file), "lib_coacd.so")) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes__init_.py", line 374, in init self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd\lib_coacd.so' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\shayp\Desktop\Untitled-1.py", line 1, in import coacd File "C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd__init__.py", line 21, in lib = ctypes.CDLL(os.path.join(os.path.dirname(file), "lib_coacd.dll")) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes__init_.py", line 374, in init self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'C:\Users\shayp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\coacd\lib_coacd.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Is it possible to run this library on an x86_64 os?

from coacd.

SarahWeiii avatar SarahWeiii commented on May 16, 2024

Our library supports x86_64 os. Have you installed vc redist or visual studio?

from coacd.

SarahWeiii avatar SarahWeiii commented on May 16, 2024

We have updated the pypi package, including all the .dll in the wheel. You could install the latest (0.0.4) and try if it works.

from coacd.

Shayp277 avatar Shayp277 commented on May 16, 2024

We have updated the pypi package, including all the .dll in the wheel. You could install the latest (0.0.4) and try if it works.

I have both vc redist and visual studio.
How do I get version 0.0.4? pip install coacd is giving me version 0.0.3
thanks

from coacd.

SarahWeiii avatar SarahWeiii commented on May 16, 2024

You may try pip install coacd --upgrade

from coacd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.