Sun 06 Nov 2016 09:46:34 PM UTC, original submission:
Dear software developer,
I’m using Octave version 4.0.3 on Windows 8.1 (x64) and found the following bug.
I tried to program the example from appendix ‘A.1.9 Calling External Code from Oct-Files’ of ‘octave.pdf’ manual. The direct usage of mkoctfile command from the Octave-GUI don’t yields the expected result as described in the manual. Thus, Octave should automate ‘this by providing the mkoctfile command with which to build oct-files’. However this automation does not work currently. That is the bug.
As solution I take ‘--verbose’ of the command and after that with the help of Octave bash shell by ‘try and error’ I find out the correct input. You can find it below:
$ gfortran -Wall -c -O -mieee-fp fortransub.f -o fortransub.o
$ g++ -Wall -c -I/scratch/jwe/mxe-octave/usr/i686-w64-mingw32/include -I/C/Octave/Octave-4.0.3/include/octave-4.0.3/octave/.. -I/C/Octave/Octave-4.0.3/include/octave-4.0.3/octave -I/C/Octave/Octave-4.0.3/include -pthread -mieee-fp -g -O2 fortrandemo.cc -o fortrandemo.o
$ g++ -Wall -I/C/Octave/Octave-4.0.3/include/octave-4.0.3/octave/.. -I/C/Octave/Octave-4.0.3/include/octave-4.0.3/octave -I/C/Octave/Octave-4.0.3/include -pthread -mieee-fp -g -O2 -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o fortrandemo.oct fortransub.o fortrandemo.o -L/C/Octave/Octave-4.0.3/lib/octave/4.0.3 -L/C/Octave/Octave-4.0.3/lib -lliboctinterp -lliboctave -Wl,-rpath-link,/scratch/jwe/mxe-octave/usr/i686-w64-mingw32/lib -L/scratch/jwe/mxe-octave/usr/i686-w64-mingw32/lib -Wl,--export-all-symbols –llibgfortran
As shown above there were two main problems. Firstly, the linking of the correct libraries was erroneously: lliboctinterp, lliboctave (llibgfortran is currently missing) and secondly, the backslash of the include paths was wearisome, which I had to edit manually.
There is nothing more to be reported. I hope you will fix this bug, which would be a great help for unprofessional programmer as me.
Thank you for your effort!
|