# Example library - Rmath, let's fix # https://github.com/JuliaLang/julia/issues/6131 include("clone_example.jl") # If you run this on Windows, it likely won't work - # See https://github.com/tkelman/JuliaCon2015/blob/master/KelmanJuliaCon2015.pdf run(`make -C ../Rmath-julia clean`) run(`make -C ../Rmath-julia -j4`) # Does it work? if VERSION <= v"0.5" # The version that came with Julia ccall((:pgamma,"libRmath-julia"), Cdouble, (Cdouble,Cdouble,Cdouble,Cint,Cint), 1.0,1.0,1.0,0,0) end # The version we just compiled # Copy it to a new name just to be sure we aren't using # the same copy we just called cp("../Rmath-julia/src/libRmath-julia.$(Libdl.dlext)", "../Rmath-julia/src/libRmath-julia2.$(Libdl.dlext)") ccall((:pgamma,"../Rmath-julia/src/libRmath-julia2"), Cdouble, (Cdouble,Cdouble,Cdouble,Cint,Cint), 1.0,1.0,1.0,0,0) #Pkg.build("Rmath") #Pkg.test("Rmath") #using Rmath