On Mon, May 20, 2019 at 20:50:54 +0200, Kai Torben Ohlhus wrote:
> Unfortunately, I do not have a MS Windows system to test. But for
> reference, the attached program works on Linux (openSUSE 15.0), with Octave
> 5.1.0 and the OF package control 3.2.0 installed.
> To me it looks like your m-File directory is not loaded by the embedded
> interpreter to the search path. To verify this, try to compile run the
> attached program, which tries to locate the "pkg.m" function by calling
If I had to guess, the problem on Windows is that the calling
environment doesn't set the OCTAVE_HOME environment variable. Note that
that variable is required on Windows for Octave to run correctly.
Hello Kai and Mike,
Thank you for your emails.
Mike's solution worked. I had to
1. export the OCTAVE_HOME=C:\Octave\Octave-126.96.36.199\mingw64 in the system environment variables for my user name. On Windows 10 System properties -> Environment variables -> User variables for xxx user -> New -> variable name as OCTAVE_HOME and value as C:\Octave\Octave-188.8.131.52\mingw64.
2. compile the case again with mkoctfile --link-stand-alone embedded.cc -o embedded.exe
3. embedded.exe on command prompt in the working directory. I could execute this time without any errors. And, I checked that it loaded the package and executed the instructions too.
Thank you for your help Mike.
Thank you for your help.