Hot answers tagged

13

(Reposting my comment as an answer) The reason this is happening is that the Mathematica launcher script sets LD_LIBRARY_PATH so that libraries included in the layout will be found and used, and that setting is inherited by any external process started from the kernel. But, sometimes it may happen that the external executable is linked against a conflicting ...


7

I think this is an OS X issue. Note that if you launch Mathematica from a terminal, you will get the value of Environment["PATH"] which you expected. For GUI applications that are started through Finder/LaunchServices, the environment (and $PATH in particular) is different and determined by the OS (this is a related recent question that had to do with ...


5

Your RunProcess works properly in all examples and System settings are fine. As @Oleksandr R. has admitted, date is a shell builtin on Windows. So there are commands date /t and time /t in cmd Windows shell that can be used instead. In Mathematica for Windows: $SystemShell == "cmd" (* True *) So something like: RunProcess[{"cmd", "/c", "date /t&&...


4

The issue here is that when Mathematica executes an external system command, at least on Linux, it does so from the current directory. You can verify this via Directory[] Run["! echo $PWD > file.txt"]; FilePrint["file.txt"] which is my default working directory. I actually have a line in my /home/jason/.Mathematica/Kernel/init.m file that says ...


3

The following approach works for me with a Vanilla Visual Studio 2015 installation (14.0) and Mathematica 10.2 (for Windows 8.1, x64). Open vs2015. Create a new empty project, let us call it LibraryLinkDemo. I always uncheck "Create Directory for solution", but it should work with that on. Change the platform to x64. Open the property pages for the project....


2

Essentially, two things needed to be done and amended in my script: The exact path location of the simulation needed to clarified. So, instead of writing: programName inputfile.ele I had to put: /User/location/somewhere/programName inputfile.ele Secondly, by putting a generic output I was able to more clearly see exactly what the problem is: ...


2

Pretty easy just try the below code Run["racket -t foo.rkt -l racket -e '(hello ....)'"] I don't have mathematica on this system to check it for you right now though. the trick is to run racket through kernel try this code and let us know what happened it may need bit of tweaking. remember if you can't capture the output you have to send it to a file and ...


2

It is certainly an OS X issue. Assuming the default shell is configured, when Terminal starts up it runs the script file ~/.bash_profile, which usually modifies the PATH environment variable. You can do the same thing in Mathematica with SetEnvironment["PATH" -> Import["!source ~/.bash_profile; echo $PATH", "Text"]] After which Environment["PATH"] ...


2

Let's override the Run so it stops acting up. Needs["NETLink`"]; InstallNET[]; Unprotect[Run]; Run[x___] := Module[{t, p}, LoadNETType["System.IO.Directory"]; Directory`SetCurrentDirectory[Directory[]]; t = NETNew["System.Diagnostics.Process"]; t@StartInfo@FileName = "C:\\Windows\\System32\\cmd.exe"; t@StartInfo@Arguments = "/c " <> ...


1

I failed to use RunProcess and friends even after I set SSH with empty passphrase for my test repository. I don't know how to proceed this way but maybe someone is interested in the work around I'm using. I'm using Batch file (I'm working on Windows, sorry). With a little help of MMA templates system, which is not necessary but I find it convenient. So ...


1

Run["start notepad C:\\Users\\Dimitris\\Desktop\\C32EXE\\composites.dat"]; Finish editing. Then: Run["C:\\Users\\Dimitris\\Desktop\\C32EXE\\composites.exe"];


1

It has been over a year since I asked this question and I have since gotten the demo code to compile and have built and deployed several WSTP projects of my own. I suspect that the key problem above is that I was trying to compile a console application rather than a Win32 application. I also notice that in the Solution Explorer above I've included several ...



Only top voted, non community-wiki answers of a minimum length are eligible