Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.fortran

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-18-2006, 06:16 PM
Nye
Guest
 
Posts: n/a
Default help on ifort compiler

I have turned to ifort today, but with the same progs, when compiling,
it shows errors like this,
undefined reference to 's_copy'
.....................................'s_cmp'
and to 's_wsfe' 'do_fio', also

maybe it has some to do with the libs I build before with gcc, but now
how to fix this? thanks
--

Don't forget your dreamS
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 10-18-2006, 06:29 PM
Richard E Maine
Guest
 
Posts: n/a
Default Re: help on ifort compiler

Nye <zuyingl@gmail.com> wrote:

> I have turned to ifort today, but with the same progs, when compiling,
> it shows errors like this,
> undefined reference to 's_copy'
> ....................................'s_cmp'
> and to 's_wsfe' 'do_fio', also
>
> maybe it has some to do with the libs I build before with gcc,


Yes, very likely. Libraries built for one compiler don't generally work
for another. These symptoms fit that scenario quite well.

> but now how to fix this?


Rebuild them with the compiler you are using now. Somehow, I think I
missed the real question here, but that's the answer to what you asked.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
Reply With Quote
  #3 (permalink)  
Old 10-18-2006, 07:09 PM
Steve Lionel
Guest
 
Posts: n/a
Default Re: help on ifort compiler

Nye wrote:
> I have turned to ifort today, but with the same progs, when compiling,
> it shows errors like this,
> undefined reference to 's_copy'
> ....................................'s_cmp'
> and to 's_wsfe' 'do_fio', also
>
> maybe it has some to do with the libs I build before with gcc, but now
> how to fix this? thanks


Richard Maine's advice is good if the libs you built were built with a
different Fortran compiler. But if you built them with the gcc C
compiler, then the answer is different and is addressed by the
following section of the ifort compiler release notes (always worth a
read - the guy who writes these is an absolute genius! :-))

Change in Linking Mixed Fortran-C++ Applications

Fortran applications are no longer linked against a C++ runtime library
by default. If the Intel Fortran driver ( ifort) is used to link mixed
C++ and Fortran applications, there are three switches that can be used
to specify linking against the correct libraries:

-cxxlib tells the ifort driver to link against the default C++
libraries on the system. If the GNU gcc version is lower than 3.2, the
older Intel C++ (Dinkumware*) libraries will be used, otherwise the
default GNU g++ libraries will be used. You can change the library
selection with one of the following two switches to be used in addition
to -cxxlib.

-cxxlib-icc specifies that the older Intel C++ (Dinkumware*) libraries
are to be used, regardless of the installed gcc version. Note that
current versions of the IntelŪ C++ Compiler use the gcc libraries by
default.

-cxxlib-gcc specifies that the GNU G++ libraries are to be used,
regardless of the installed gcc version. Note that link errors may
occur if the installed gcc lower than 3.2. You may also specify a path
to the gcc libraries you want used with the variant
-cxxlib-gcc=pathtolibs.

For example, if you were to use the ifort driver to link a
mixed-language application, your command line might be:

ifort prog.f90 prog_cpp_code.o -cxxlib -cxxlib-gcc


Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/
My Fortran blog
http://www.intel.com/software/drfortran

Reply With Quote
  #4 (permalink)  
Old 10-18-2006, 08:45 PM
Tim Prince
Guest
 
Posts: n/a
Default Re: help on ifort compiler

Nye wrote:
> I have turned to ifort today, but with the same progs, when compiling,
> it shows errors like this,
> undefined reference to 's_copy'
> ....................................'s_cmp'
> and to 's_wsfe' 'do_fio', also
>
> maybe it has some to do with the libs I build before with gcc, but now
> how to fix this? thanks

Those are libf2c/libg2c Fortran run-time calls. You must have compiled
Fortran code with g77, or f2c and a C compiler. In general, it is not a
good idea to try to build an application with more than one Fortran
run-time library. If you have the Fortran source code, recompile
everything with ifort.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: compiler or interpreter Pudding Man Newsgroup comp.soft-sys.sas 0 04-06-2006 09:42 PM
Re: compiler or interpreter Gerhard Hellriegel Newsgroup comp.soft-sys.sas 0 04-06-2006 04:50 PM
Re: compiler or interpreter Arthur Tabachneck Newsgroup comp.soft-sys.sas 1 04-06-2006 04:12 PM
Re: compiler or interpreter Jack Hamilton Newsgroup comp.soft-sys.sas 0 04-06-2006 04:42 AM
Re: compiler or interpreter Diwakar Sharma Newsgroup comp.soft-sys.sas 0 04-04-2006 02:25 PM



All times are GMT. The time now is 07:49 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.