File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,12 @@ octversion = $(shell $(mkoctfile) --version 2>&1 | sed -e 's/^mkoctfile, version
34
34
octversionflag = -DOCTAVE_MAJOR=$(word 1,$(octversion ) ) -DOCTAVE_MINOR=$(word 2,$(octversion ) )
35
35
36
36
# Add the -rpath flag so that the dynamic linker finds liboctave.so etc. when
37
- # Pure loads the module.
37
+ # Pure loads the module. NOTE: This doesn't seem to be needed any more.
38
38
RLD_FLAG =$(shell $(mkoctfile ) -p RLD_FLAG)
39
39
40
+ # Octave 5.1 doesn't automatically include these linker options any more.
41
+ OCT_FLAGS =-L$(shell $(mkoctfile ) -p OCTLIBDIR) $(shell $(mkoctfile ) -p LIBOCTINTERP) $(shell $(mkoctfile ) -p LIBOCTAVE)
42
+
40
43
DISTFILES = COPYING Makefile README embed.cc embed.h \
41
44
gsl_structs.h gnuplot.pure octave.pure debian/* examples/*.pure
42
45
SEDFILES = README
@@ -68,7 +71,7 @@ octave_embed$(DLL): embed.cc embed.h
68
71
else
69
72
octave_embed$(DLL ) : embed.cc embed.h
70
73
rm -f $@
71
- $(mkoctfile ) -v $(octversionflag ) -o $@ $< -lpure $(RLD_FLAG )
74
+ $(mkoctfile ) -v $(octversionflag ) -o $@ $< -lpure $(RLD_FLAG ) $( OCT_FLAGS )
72
75
if test -f $@ .oct; then mv $@ .oct $@ ; fi
73
76
endif
74
77
endif
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ extern "C" void octave_restore_signal_mask (void);
61
61
#define octave_interrupt_exception octave::interrupt_exception
62
62
#define octave_execution_exception octave::execution_exception
63
63
#if OCTAVE_MAJOR>4 || OCTAVE_MAJOR>=4 && OCTAVE_MINOR>=3
64
+ #if OCTAVE_MAJOR<=4
64
65
#define eval_string octave::eval_string
66
+ #endif
65
67
#define feval octave::feval
66
68
#endif
67
69
#endif
@@ -237,7 +239,12 @@ int octave_eval(const char *cmd)
237
239
// XXXFIXME: eval_string() just always segfaults with Octave 4.2.0+. No
238
240
// workaround for this is known yet. Octave 4.0 and 4.3 seem to be ok,
239
241
// though, so just stick to one of these until this is fixed.
242
+ #if OCTAVE_MAJOR>4
243
+ const std::string cmd_s = cmd;
244
+ embedded_interpreter->eval_string (cmd_s, false , parse_status, 0 );
245
+ #else
240
246
eval_string (cmd, false , parse_status, 0 );
247
+ #endif
241
248
} catch (octave_interrupt_exception) {
242
249
recover ();
243
250
std::cout << " \n " ;
You can’t perform that action at this time.
0 commit comments