Git Product home page Git Product logo

Comments (11)

herzig avatar herzig commented on May 23, 2024 2

@trelau Sorry I mixed up my working copies, embarassing... I can build your branch fine (with BUILD_WITH_DEBUG OFF). i generates an exe, and I just successfully meshed a geometry that all other simple meshing tools failed to mesh. Awesome project!

from tetwild.

herzig avatar herzig commented on May 23, 2024 2

I could resolve the linker issue by moving the definition for the static function MeshCellsStore::cell_type_to_cell_descriptor in geogram mesh.h to the mesh.cpp file.

mesh.h now looks like this:

		static const CellDescriptor& cell_type_to_cell_descriptor(
			MeshCellType t
		);

and this added to mesh.cpp

	const CellDescriptor& MeshCellsStore::cell_type_to_cell_descriptor(
		MeshCellType t
	) {
		geo_debug_assert(t < GEO::MESH_NB_CELL_TYPES);
		return *(MeshCellDescriptors::cell_type_to_cell_descriptor[t]);
	}
    

I can build tetwild.exe now without any problems and using background meshes (the part that was causing linker problems) now works as well.

from tetwild.

jdumas avatar jdumas commented on May 23, 2024 2

Just FYI, the linking issue with Geogram should be fixed with the latest version (1.6.6).

from tetwild.

trelau avatar trelau commented on May 23, 2024 1

@herzig Great! I just took a step back and pushed a branch that builds the basic exe https://github.com/trelau/TetWild/commit/78aa7fc42750e6dce1278890c97c5428af46b47c I had to comment out some code to resolve the external, so looking for the root cause now. This should now represent the initial state of @Yixin-Hu 's code. I'm thinking about refactoring the API a little in the tetwild.h file (use a single class to define parameters and load/retrieve mesh) to make it easier to optionally build as a shared lib. If you're looking to contribute the next step will be to optimize for speed!

from tetwild.

Yixin-Hu avatar Yixin-Hu commented on May 23, 2024

Could you try this cmakelists?

https://github.com/Yixin-Hu/TetWild/blob/cbd8713cb5ee37c8fe475a87f5c61c4829b89dd1/CMakeLists.txt

from tetwild.

herzig avatar herzig commented on May 23, 2024

Just did, still the same result
Here's the cmake output:

Selecting Windows SDK version  to target Windows 10.0.17134.
No build type selected, default to Release
Using local options file: D:/proj/TetWild/extern/geogram/CMakeOptions.txt
Configuring build for standalone Geogram (without Vorpaline)
Configuring 64 bits build
Doxygen >= 1.7.0 not found, cannot generate documentation
Boost version: 1.67.0
Boost include dirs: C:/dev/boost_1_67_0
Boost libraries:    
Found CGAL: C:/dev/CGAL-4.12/build
Boost version: 1.67.0
Found the following Boost libraries:
  thread
  system
  chrono
  date_time
  atomic
Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY Matlab_MEX_EXTENSION MEX_COMPILER MX_LIBRARY ENG_LIBRARY) (found version "unknown")
Could NOT find MOSEK (missing: MOSEK_LIBRARIES MOSEK_INCLUDE_DIR) 
Creating target: igl::core
Found CGAL: C:/dev/CGAL-4.12/build
Creating target: igl::cgal
Boost version: 1.67.0
Found the following Boost libraries:
  thread
  system
  chrono
  date_time
  atomic
Configuring done
Generating done

Also the complete build output:
tetwild_vs14win64.txt

from tetwild.

Yixin-Hu avatar Yixin-Hu commented on May 23, 2024

Could you try using older version of geogram, like version ~1.5.5?

from tetwild.

herzig avatar herzig commented on May 23, 2024

Tried with 1.5.5 and 1.5.2, unfortuneately, exactly the same result for both version.

Maybe I am using the wrong, cmake generator/VS version, which did you use to test it under Windows?

from tetwild.

trelau avatar trelau commented on May 23, 2024

@herzig you may have a look here https://github.com/trelau/TetWild/commits/reorg

For Windows, nothing was being exported to the shared library so it didn't generate TetWild.lib. I made some changes as outlined in the commit history that includes:

  • Build a static lib when building an executable

  • Build a shared lib only when NOT building an executable (this will be nice if using tetwild in a different program)

Still some things that need cleaned up but I think I'm on the right track...

from tetwild.

herzig avatar herzig commented on May 23, 2024

@trelau Could you get it working with your version?

I have the same issue as before. geogram.lib is created fine, but then linking tetwild_lib fails.

I tried to use the dumpbin utility to list all symbols defined in geogram.lib, and the supposedly missing symbol
?cell_type_to_cell_descriptor@MeshCellDescriptors@GEO@@3PAPEAUCellDescriptor@2@A (struct GEO::CellDescriptor * * GEO::MeshCellDescriptors::cell_type_to_cell_descriptor)
is listed in the output. Why the linker can not find the symbol is beyond me, any ideas?

Full output of dumpbin /exports geogram.lib :
geogram_lib_exports.txt

from tetwild.

trelau avatar trelau commented on May 23, 2024

@herzig in my branch, when i turn BUILD_WITH_DEBUG to OFF the TetWild.exe will build and link to the static libTetWild.lib (I renamed some stuff). All this switch does is not compile things that use PyMesh to write out stuff (I plan to change this). But, this tells us something, although it's strange that an unresolved external to what seems like geogram shows up in the code that is being left out with BUILD_WITH_DEBUG...?

from tetwild.

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.