- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to run a simple code(hello.f90) under linux using F90. (code is shown as follows):
> > program hello
> > !
> > implicit none
> > !
> > write ( *, '(a)' ) ' '
> > write ( *, '(a)' ) 'hello:'
> > write ( *, '(a)' ) ' '
> > write ( *, '(a)' ) ' hello, world!'
> > write ( *, '(a)' ) ' '
> >
> > stop
> > end
> > !
> > implicit none
> > !
> > write ( *, '(a)' ) ' '
> > write ( *, '(a)' ) 'hello:'
> > write ( *, '(a)' ) ' '
> > write ( *, '(a)' ) ' hello, world!'
> > write ( *, '(a)' ) ' '
> >
> > stop
> > end
when I compiled it, it was fine:
>ifc -w90 -c -o -quiet hello.o hello.f90
but linking showed problems:
>/compat/linux/usr/bin/ld hello.o
/compat/linux/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
hello.o: In function `MAIN__':
hello.o(.text+0x10): undefined reference to `__intel_proc_init'
hello.o(.text+0x1a): undefined reference to `for_set_reentrancy'
hello.o(.text+0x52): undefined reference to `for_write_seq_fmt'
hello.o(.text+0x8a): undefined reference to `for_write_seq_fmt'
hello.o(.text+0xc2): undefined reference to `for_write_seq_fmt'
hello.o(.text+0xfa): undefined reference to `for_write_seq_fmt'
hello.o(.text+0x141): undefined reference to `for_write_seq_fmt'
hello.o(.text+0x158): undefined reference to `for_stop_core'
I do not know if my command is not correct or some other problems. could anyone help solve this problem?
thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should link using ifc (or ifort if 8.0), as the Fortran driver supplies the necessary libraries. If you must use ld directly, see the Fortran User Manual for the libraries to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried as you said, but it did not work. I just saw an old message on the board about installing intel fortran complier on FreeBSD. you metioned FreeBSD isn't one of the supported platforms. actually our fortran complier is installed on FreeBSD. Is that the real reason caused such a problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check that the compiler environment paths are set up for the linker to find the libraries installed by the Intel compiler. Non-support of FreeBSD may mean only that someone must set up those paths manually. The environment variable scripts which come with the compiler are provided to accomplish this under tcsh or bash, when running on linux.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page