Execute_command_line
Szabó László
szabola@met.hu
Mon Oct 7 14:03:00 GMT 2013
Hello
I'm newbie on this mailing list, and I have a question on executive_command_line subroutine. We have on our server:
gfortran44 -v
Using built-in specs.
Target: x86_64-redhat-linux6E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --disable-gnu-unique-object --with-as=/usr/libexec/binutils220/as --enable-languages=c,c++,fortran --disable-libgcj --with-mpfr=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-x86_64-redhat-linux6E/mpfr-install/ --with-ppl=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-x86_64-redhat-linux6E/ppl-install --with-cloog=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-x86_64-redhat-linux6E/cloog-install --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux6E
Thread model: posix
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
But when I compile my program with execute_command_line subrutine, the linker drops an error:
test.o: In function `MAIN__':
/vol4/verif/work/rekur_tiszta.f:763: undefined reference to `execute_command_line_'
collect2: ld returned 1 exit status
What is the cause of this error? Did I miss some linking options?
On this page (http://gcc.gnu.org/onlinedocs/gfortran/EXECUTE_005fCOMMAND_005fLINE.html) I saw that executive_command_line subroutine could be used from Fortran 2008, and we have 2011 version of gcc. What is the problem?
Here is the commands with which I compile and link my program:
gfortran44 -g -c -w test.f
gfortran44 test.o -o test
And here is my test program:
PROGRAM TEST
EXECUTIVE_COMMAND_LINE('ls')
STOP
END
Thank you
László Szabó
More information about the Fortran
mailing list