jump-dev / MiniZinc.jl

A Julia interface to the MiniZinc constraint modeling language
https://www.minizinc.org/
MIT License
18 stars 4 forks source link

MiniZinc.jl import problem on Windows #18

Closed mhechthz closed 1 year ago

mhechthz commented 1 year ago

I posted this recently but now it vanished.

If I import MiniZinc I get the error:

ERROR: LoadError: InitError: Unsupported platform

Importing a second time is no problem. so I have to do the following

print("import libs ...")
ENV["JULIA_LIBMINIZINC_DIR"] = "C:\\bin\\MiniZinc"
try
    import MiniZinc
catch
    println("catch ERROR: LoadError: InitError: Unsupported platform ...")
    import MiniZinc
end
const MOI=MiniZinc.MOI
print("import libs done ...")

So after this all works well. Where is the problem?

odow commented 1 year ago

Your issue was here: https://github.com/jump-dev/MiniZinc.jl/issues/15

I fixed it in https://github.com/jump-dev/MiniZinc.jl/pull/17

A new version is available: https://github.com/jump-dev/MiniZinc.jl/releases/tag/v0.2.0

Please update your packages.

odow commented 1 year ago

All-in-all, MiniZinc.jl is new and it is still a little rough. Please keep reporting bugs and feature requests :smile:

mhechthz commented 1 year ago

So I did 😄

odow commented 1 year ago

Closing as a duplicate of #15