Giter VIP home page Giter VIP logo

Comments (5)

hroncok avatar hroncok commented on June 1, 2024 1

Ideally, we would compile on some CI, e.g. GitHub actions.

from admesh.

hroncok avatar hroncok commented on June 1, 2024

Why don't you get the precompiled version for Windows?
https://github.com/admesh/admesh/releases/tag/v0.98.2

Compiling on Windows i tricky, I recommend using cygwin.

from admesh.

nishbo avatar nishbo commented on June 1, 2024

Hi, since there was no precompiled zip for the latest release, I also opted for compiling from source on Windows. The following steps worked for me.

Prerequisites:

  • cmake and cmake-gui (I installed mine through cygwin)
  • Visual Studio 16 2019 Community
  • getopt installed through vcpkg and integrated with Visual Studio. Install the correct triplet: getopt:x64-windows for x64.

Steps:

  1. Download the repository.
  2. Open cmake-gui, put the location of the downloaded repository into "where is the source code", and another, empty, directory outside of the downloaded repository into "where to build". Press "Configure". Set compile options (installed Visual Studio, x64).
  3. Change CMAKE_INSTALL_PREFIX to the desired install location. In my case:
    Source code: E:/Repositories/admesh
    Where to build: E:/Repositories/admesh-build
    CMAKE_INSTALL_PREFIX: E:/programs/admesh
    Press "Configure" again, then "Generate" and "Open Project".
  4. I made the following changes to the code to make it run:
    Build for Release.
    In 'src/portable_endian.h' comment out #include <sys/param.h> on line 71. Not sure why unix header is included under __WINDOWS__.
    In 'src/util.c' add #define _USE_MATH_DEFINES on line 26, before #include <math.h>. Needed for M_PI.
    On the right, in Solution Explorer, right-click on libadmesh, click "Build". (DLL is needed for INSTALL)
    On the right, in Solution Explorer, right-click on libadmesh, open Properties, change Configuration Properties->General->Configuration Type to "Static library (.lib)". Change Configuration Properties->Advanced->Target File Extension to "". Close the libadmesh properties. (Static library is needed for admesh)
    Right-click on admesh, open Properties. In Configuration Properties->Linker->Input->Additional Dependencies remove m.lib; and everything after. Only Release\libadmesh.lib should remain.
  5. Right-click on ALL_BUILD and Build.
  6. Right-click on INSTALL and Build.

I could not figure out how to install the python module, it cannot find the installed admesh. If I will need to return to it, I will post a solution here.

from admesh.

andreondra avatar andreondra commented on June 1, 2024

Because nowadays the install of the Linux under WSL2 is a matter of a single command, I suggest also adding a simple guide for building/using admesh on Windows using the WSL as an option.

from admesh.

gbettega avatar gbettega commented on June 1, 2024

Hi,
many thanks to nishbo Anton Sobinov for its valuable help:
I was able to compile admesh using MSVC 2019 (actually I would
like to use the static library libadmesh.lib).
The strange thing is that both using the admesh.exe application
and both the static library above, I got an error in reading an .stl ascii file,
taken from the examples, or generated by me.
The error is "... something is syntactically very wrong in ",
ending with a very strange ": no error".
stl exit on error than is called.
Actually there is nothing wrong in the .stl ascii files.
The section of code for reading such a .stl file file is simple: it reads facets
one by one: 12 %f" floats ", checking for each facet that actually 12 numbers
have been read.
I cannot figure out what is happening.
Any idea?
Ciao
Giovanni

from admesh.

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.