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

Patches for mingw llvm support. #13

Open
fire opened this issue Aug 4, 2023 · 5 comments
Open

Patches for mingw llvm support. #13

fire opened this issue Aug 4, 2023 · 5 comments

Comments

@fire
Copy link

fire commented Aug 4, 2023

Patches for mingw llvm support. I tested with ninja.

scoop bucket add dorado https://github.com/chawyehsu/dorado
scoop update
scoop install llvm-mingw ninja cmake
git clone https://github.com/cgg-bern/quadwild-bimdf --recurse-submodules
cd quadwild-bimdf
cmake . -B build -DWITH_GUROBI=0 -GNinja  -DSATSUMA_ENABLE_BLOSSOM5=1
cd build
ninja
cd Build/bin
.\quadwild.exe .\mesh.ply 2 .\config\prep_config\basic_setup.txt
.\quad_from_patches.exe  .\mesh_rem_p0.obj 1000 .\config\main_config\flow_noalign.txt

vcglib

diff --git a/vcg/space/index/grid_util.h b/vcg/space/index/grid_util.h
index 0be4fc93..d0ee6b65 100644
--- a/vcg/space/index/grid_util.h
+++ b/vcg/space/index/grid_util.h
@@ -29,7 +29,7 @@
 #include <vcg/space/index/space_iterators.h>
 
 
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__MINGW32__)
 #define __int64 long long
 #define __cdecl
 #endif
diff --git a/vcg/space/index/grid_util2d.h b/vcg/space/index/grid_util2d.h
index d700244a..184163fc 100644
--- a/vcg/space/index/grid_util2d.h
+++ b/vcg/space/index/grid_util2d.h
@@ -27,7 +27,7 @@
 #include<vcg/space/box2.h>


-#ifndef WIN32
+#if defined(WIN32) || defined(__MINGW32__ )
 #define __int64 long long
 #define __cdecl
 #endif

satsuma

patch.txt

comiso - base

comiso-base-patch.txt

quadwild-bimdf

quadwild-bimdf-patch.txt Has some whitespace errors in addition to changes.

@fire
Copy link
Author

fire commented Aug 4, 2023

Can I have some assistance getting these upstream?

@mheistermann
Copy link
Member

Hi @fire! Thanks for the contribution. Sorry, I didn't have time yet to look into it, but I'm interested in supporting mingw builds and help you upstream patches. Possibly we can also do some changes to CMake filesinstead of source changes in some instances.
Unfortunately, this may have to wait a bit, I'm currently pretty busy with finishing my thesis and am trying to prioritize here.

@fire
Copy link
Author

fire commented Sep 24, 2024

Nudge

@fire
Copy link
Author

fire commented Oct 18, 2024

This doesn't seem to have a huge demand so I'll probably close the issue.

@mheistermann
Copy link
Member

mheistermann commented Oct 18, 2024

Let's leave it open, I think mingw support would be really nice to have.
I once had a look at the patches, but some needed rework (removing unrelated changes) that i had no time for, so I had shelved this task.

Maybe you could create individual pull requests with the relevant changes for those individual projects hosted on github (or another public repo), that would already be 90% of the way :)

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

2 participants