As a follow up, here's some code (which requires that R be installed):
ENV["PATH"] = ENV["PATH"]*";C:\\Program Files\\R\\R-3.2.0\\bin\\x64\\"
const libR = "C:\\Program Files\\R\\R-3.2.0\\bin\\x64\\R.dll"
argv = ["REmbed"]
println(ccall((:Rf_initEmbeddedR,libR),Cint,(Cint,Ptr{Ptr{Uint8}}),length(argv),argv))
If I run this as a script, I get an error message (unable to load shared
library). However if I first set
PATH=PATH;C:\Program Files\R\R-3.2.0\bin\x64
then run the script (from within the same command prompt session), the
error goes away.
Any ideas?
Simon
On Friday, 8 May 2015 09:55:29 UTC+1, Simon Byrne wrote:
>
> I'm trying to understand how ENV works (at least on Windows):
>
> I'm trying to ccall a library that requires a particular addition to
> "PATH". If I do this externally (through the Windows menus) it works okay,
> but not via ENV["PATH"]. I assume that this means that ENV only changes the
> local process? If so, is there anyway I can modify the system variable from
> within Julia?
>
> -Simon
>