On Tue, Jun 10, 2014 at 11:07 AM, Andrew Schultz <ajsch...@verizon.net> wrote:
> Richard Shaw wrote: > >> /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o: In >> function `_start': >> (.text+0x20): undefined reference to `main' >> collect2: error: ld returned 1 exit status >> rmbadname1: Replacing "len" with "len_bn". >> /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o: In >> function `_start': >> (.text+0x20): undefined reference to `main' >> collect2: error: ld returned 1 exit status >> error: Command "/usr/bin/gfortran -Wall -Wl,-z,relro -Wl,-z,relro >> /tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/wmodule.o >> /tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/fortranobject.o >> /tmp/tmpom3x2m/wspr1.o /tmp/tmpom3x2m/getfile.o >> /tmp/tmpom3x2m/paterminate.o /tmp/tmpom3x2m/audiodev.o >> /tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/w-f2pywrappers.o >> thnix.o libwspr.a -L/usr/lib64 -lfftw3f -lgfortran -lportaudio -lpthread >> -lsamplerate -lpython3.3m -lgfortran -o ./w.cpython-33m.so >> <http://w.cpython-33m.so>" failed with exit status 1 >> >> make: *** [WsprMod/w.so] Error 1 >> > > It'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'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. None of the very few c files define main so I'm guessing it's defined in the fortran code. Thanks, Richard
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct