<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 10, 2014 at 11:07 AM, Andrew Schultz <span dir="ltr">&lt;<a href="mailto:ajschult@verizon.net" target="_blank">ajschult@verizon.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Richard Shaw wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
/usr/lib/gcc/x86_64-redhat-<u></u>linux/4.8.2/../../../../lib64/<u></u>crt1.o: In<br>
function `_start&#39;:<br>
(.text+0x20): undefined reference to `main&#39;<br>
collect2: error: ld returned 1 exit status<br>
rmbadname1: Replacing &quot;len&quot; with &quot;len_bn&quot;.<br>
/usr/lib/gcc/x86_64-redhat-<u></u>linux/4.8.2/../../../../lib64/<u></u>crt1.o: In<br>
function `_start&#39;:<br>
(.text+0x20): undefined reference to `main&#39;<br>
collect2: error: ld returned 1 exit status<br>
error: Command &quot;/usr/bin/gfortran -Wall -Wl,-z,relro -Wl,-z,relro<br>
/tmp/tmpom3x2m/tmp/tmpom3x2m/<u></u>src.linux-x86_64-3.3/wmodule.o<br>
/tmp/tmpom3x2m/tmp/tmpom3x2m/<u></u>src.linux-x86_64-3.3/<u></u>fortranobject.o<br>
/tmp/tmpom3x2m/wspr1.o /tmp/tmpom3x2m/getfile.o<br>
/tmp/tmpom3x2m/paterminate.o /tmp/tmpom3x2m/audiodev.o<br>
/tmp/tmpom3x2m/tmp/tmpom3x2m/<u></u>src.linux-x86_64-3.3/w-<u></u>f2pywrappers.o<br>
thnix.o libwspr.a -L/usr/lib64 -lfftw3f -lgfortran -lportaudio -lpthread<br>
-lsamplerate -lpython3.3m -lgfortran -o ./<a href="http://w.cpython-33m.so" target="_blank">w.cpython-33m.so</a><br></div>
&lt;<a href="http://w.cpython-33m.so" target="_blank">http://w.cpython-33m.so</a>&gt;&quot; failed with exit status 1<div class=""><br>
make: *** [WsprMod/w.so] Error 1<br>
</div></blockquote>
<br>
It&#39;s using the gfortran to link and then explicitly adding -lgfortran (twice, of course);  gfortran will do this automatically.  Also, if a executable has a main method in C, then you&#39;ll be more successful linking the program with gcc instead of gfortran (if it has a main program in fortran, then use gfortran to link).  It might be possible to go the other way, but I have never had success.</blockquote>
<div><br></div><div>None of the very few c files define main so I&#39;m guessing it&#39;s defined in the fortran code.</div><div><br></div><div>Thanks,</div><div>Richard </div></div></div></div>