Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/DLSolvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ function trytofindjlllib(name::AbstractString)
ptr_name = Symbol("lib" * name * "_handle")
filepath_name = Symbol("lib" * name * "_path")

ptr = getproperty(ODEInterface_jll, ptr_name) :: Ptr{Nothing}
filepath = getproperty(ODEInterface_jll, filepath_name) :: AbstractString
# Access ODEInterface_jll - it's imported at module level by loadODESolvers
# Use @eval to access the module reference
ptr = @eval getproperty(ODEInterface_jll, $(QuoteNode(ptr_name))) :: Ptr{Nothing}
filepath = @eval getproperty(ODEInterface_jll, $(QuoteNode(filepath_name))) :: AbstractString
return (ptr, filepath)
end

Expand Down Expand Up @@ -161,8 +163,10 @@ function loadODESolvers(extrapaths::Vector=AbstractString[],
end
use_jll = VERSION >= v"1.3" && !ignore_jll
if use_jll
@eval ODEInterface begin
using ODEInterface_jll
# For Julia 1.12+, we need to import at module level, not inside @eval
# Store the loaded module in a local variable for use
@eval begin
import ODEInterface_jll
end
end
for solver in solverInfo
Expand Down