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

Small updates to enable MinGW builds on Windows #7

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davegelwan
Copy link
Collaborator

@davegelwan davegelwan commented Apr 5, 2023

Closes #6

These changes should be cleaned up to remove any hardcoded paths and to ensure Mac/Linux compatibility

@davegelwan davegelwan requested a review from EdoAlvarezR April 5, 2023 17:06
JULIA_H=C:/Users/dave/AppData/Local/Programs/Julia-1.7.0/include/julia
JLCXX_H=C:/Users/dave/.julia/artifacts/c59cc3313b777d84d3bfeaa750b97bbd9f2b7d12/include
JULIA_LIB=C:/Users/dave/AppData/Local/Programs/Julia-1.7.0/include/julia/../../lib
JLCXX_LIB=C:/Users/dave/.julia/artifacts/c59cc3313b777d84d3bfeaa750b97bbd9f2b7d12/include/../lib
Copy link
Collaborator Author

@davegelwan davegelwan Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard coded these paths because the Julia code above returns the paths with the wrong slashes \\ vs /

@@ -150,7 +150,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
depcomp = "$(SHELL)" $(top_srcdir)/build-aux/depcomp
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quotes required incase mingw is installed in a directory with spaces

for (size_t b=begin; b!=end; ++b) {
for (int d=0; d<3; d++) {
bodies[b].X[d] = drand48() * 2 * M_PI - M_PI;
bodies[b].X[d] = double(rand())/RAND_MAX * 2 * M_PI - M_PI;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

srand48 and drand48 do not exist on Windows

@@ -20,7 +20,7 @@ using CxxWrap
const module_path = splitdir(@__FILE__)[1] # Path to this module

# ------------ CODE ------------------------------------------------------------
@wrapmodule(joinpath(module_path, "fmm"))
@wrapmodule(joinpath(module_path, "fmm.so.exe"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows requires file extension and for some reason adds .exe

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

Successfully merging this pull request may close these issues.

Windows compatibility
1 participant