You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a tool for automatic generation of FMUs from Python code. Bumping from FMI2 to FMI3, I am using FMI.jl to try to load and simulate the generated FMUs; it really helps me know which FMI3 functions are still lacking from my codebase, so that I can implement them one after the other.
Description
Function fmi3GetBinary is not yet implemented on my side. The check for whether this function exists or not on the FMU's side is not performed with dlsym, but with the tailor-made dlsym_opt function (defined in src/FMI2/ext.jl in my version, moved to src/binary.jl since). This is the source code of this function:
function dlsym_opt(libHandle, symbol)
addr = dlsym(libHandle, symbol; throw_error=false)
if addr == nothing
logWarning(fmu, "This FMU does not support function '$symbol'.")
addr = Ptr{Cvoid}(C_NULL)
end
addr
end
As the program enters the if block, this is indeed the error I get:
ERROR: LoadError: UndefVarError: `fmu` not defined
Context
I am working on a tool for automatic generation of FMUs from Python code. Bumping from FMI2 to FMI3, I am using FMI.jl to try to load and simulate the generated FMUs; it really helps me know which FMI3 functions are still lacking from my codebase, so that I can implement them one after the other.
Description
Function
fmi3GetBinary
is not yet implemented on my side. The check for whether this function exists or not on the FMU's side is not performed withdlsym
, but with the tailor-madedlsym_opt
function (defined insrc/FMI2/ext.jl
in my version, moved tosrc/binary.jl
since). This is the source code of this function:As the program enters the
if
block, this is indeed the error I get:The code is still exactly the same in the current
src/binary.jl
file.Thank you ❤️
The text was updated successfully, but these errors were encountered: