diff src/mkoctfile.in.cc @ 28048:42921bff241a

Fix mkoctfile on Windows platforms when compiling Fortran sources (bug #49548). * mkoctfile.in.cc: If compiling on Windows, add the FLIBS variable to the link command when Fortran sources are given.
author Mike Miller <mtmiller@octave.org>
date Fri, 07 Feb 2020 08:44:07 -0800
parents 49a0d90cd2a3
children cf59b503db2a
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Wed Feb 05 11:52:24 2020 -0800
+++ b/src/mkoctfile.in.cc	Fri Feb 07 08:44:07 2020 -0800
@@ -1128,6 +1128,11 @@
            + ldflags + ' ' + vars["LFLAGS"] + ' ' + octave_libs + ' '
            + vars["OCT_LINK_OPTS"] + ' ' + vars["OCT_LINK_DEPS"]);
 
+#if defined (OCTAVE_USE_WINDOWS_API) || defined(CROSS)
+      if (! f77files.empty () && ! vars["FLIBS"].empty ())
+        cmd += ' ' + vars["FLIBS"];
+#endif
+
       int status = run_command (cmd, printonly);
 
       clean_up_tmp_files (tmp_objfiles);