compilation problem: undefined reference

ppanta ppanta9@hotmail.com
Thu Aug 2 08:44:00 GMT 2007


Thanks. It seems to solve that problem. Alas, new problem sprang up and I'm
completely clueless. This is probably why I used gcc instead of gfortran.
gcc didn't give me the below error and I thought that the undefined
reference can be easily workaround ...
==================================
      ieeer = ieee_handler( "set", "all", %val(2) )                     
                                                    1
Error: Syntax error in argument list at (1)
 In file AAmainRain.F:136
      ieeer = ieee_handler( "set", "inexact", %val(1) )                 
                                                           1
Error: Syntax error in argument list at (1)
==================================

Anyway, the above error was caused by the f77_floatingpoint.h which was used
in SUN. I copied the file while I was porting to linux because the program
was referring to the header. Part of the header is defined as followed
=====
#define SIGFPE_DEFAULT  %val(0) /* default exception handling */
#define SIGFPE_IGNORE   %val(1) /* ignore exception */
#define SIGFPE_ABORT    %val(2) /* abort on exception */
====
which was used in the code as:         ieeer = ieee_handler( "set", "all",
SIGFPE_ABORT)
It consequently gave the above error which I think is because it does not
know what %val(0) is? 

The book that I have explain that % is the structure constructor which is
used to create specific instances of a derived type.
However, I still do not understand what the code is implying. If anyone can
clarifies the usage as well as pointing the error on my part, I'd be greatly
appreciate. Note that I don't see the %val define else where .. apart from
the above portion.

I'm hoping that if I somehow understand it I might be able to work around
the f77_float header that I took from SUN and change the code itself.

Thanks again.
-- 
View this message in context: http://www.nabble.com/compilation-problem%3A-undefined-reference-tf4198607.html#a11960668
Sent from the gcc - fortran mailing list archive at Nabble.com.



More information about the Fortran mailing list