From c57f18fac2132f7e0956a37a1222468f0976a0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Mon, 30 Sep 2024 19:27:30 +0200 Subject: [PATCH] Do not link to OCT_LINK_DEPS when building a .mex file. * mkoctfile.in.cc (main): Do not link to OCT_LINK_DEPS when building a .mex file. It contains flags that are needed to link to liboctinterp and liboctave. .mex files no longer need to (and should not) link to these libraries. --- src/mkoctfile.in.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mkoctfile.in.cc b/src/mkoctfile.in.cc index db5fa29fae..10153fbe01 100644 --- a/src/mkoctfile.in.cc +++ b/src/mkoctfile.in.cc @@ -1364,7 +1364,10 @@ main (int argc, char **sys_argv) + pass_on_options + " -o " + octfile + ' ' + objfiles + ' ' + libfiles + ' ' + ldflags + ' ' + vars["DL_LDFLAGS"] + ' ' + vars["LDFLAGS"] + ' ' + octave_libs + ' ' - + vars["OCT_LINK_OPTS"] + ' ' + vars["OCT_LINK_DEPS"]); + + vars["OCT_LINK_OPTS"]); + + if (! creating_mex_file) + cmd += ' ' + vars["OCT_LINK_DEPS"]; #if defined (OCTAVE_USE_WINDOWS_API) || defined (CROSS) if (! f77files.empty () && ! vars["FLIBS"].empty ())