<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- P { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I have been using g95 for my fortran codes for many years, but it did not work anymore after upgrading to macOS 10.14 Mojave. I was advised to install gccc9 from MacPorts instead. This I did through "sudo port selfupdate" and "sudo port install gcc9".</p>
<p>This appeared to give all the required tools. When I then tried to compile and execute the simplest fortran program test.f (the usual just writing of the message "Hello") by first compiling</p>
<p>/opt/local/bin/gfortran-mp-9 -v -c test.f</p>
<p>giving the required object file test.o, and then loading:</p>
<p>/opt/local/bin/ld -v test.o </p>
<p>this resulted in the messages</p>
<p> </p>
<p>@(#)PROGRAM:ld PROJECT:ld64-512.4</p>
<p>BUILD 05:06:53 Aug 16 2019</p>
<p>configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em</p>
<p>Library search paths:</p>
<p> /usr/lib</p>
<p>Framework search paths:</p>
<p> /Library/Frameworks/</p>
<p> /System/Library/Frameworks/</p>
<p>Undefined symbols for architecture x86_64:</p>
<p> "__gfortran_set_args", referenced from:</p>
<p> _main in test.o</p>
<p> "__gfortran_set_options", referenced from:</p>
<p> _main in test.o</p>
<p> "__gfortran_st_write", referenced from:</p>
<p> _MAIN__ in test.o</p>
<p> "__gfortran_st_write_done", referenced from:</p>
<p> _MAIN__ in test.o</p>
<p>ld: symbol(s) not found for architecture x86_64</p>
<p> </p>
<p>I thought installation of gcc9 would include everything. How should I fix this?<br>
</p>
<p><br>
</p>
<p>Hans<br>
</p>
<p><br>
</p>
</body>
</html>