For Programmers: Free Programming Magazines  


Home > Archive > Fortran > October 2004 > What does MAIN_ _MAIN_ __MAIN__ mean?(to invoke clapack)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author What does MAIN_ _MAIN_ __MAIN__ mean?(to invoke clapack)
Peng Yu

2004-10-29, 3:58 pm

At http://www.netlib.org/clapack/faq.html, you will see some code like
the following. Do you know why?

void MAIN_(){}
void MAIN__(){}
void _MAIN_(){}
Robert Corbett

2004-10-30, 3:56 am

Peng Yu <pengyu.ut@gmail.com> wrote in message news:<ng25o096tmh0r68rgs63sasru3oko52ei8@4ax.com>...
> At http://www.netlib.org/clapack/faq.html, you will see some code like
> the following. Do you know why?
>
> void MAIN_(){}
> void MAIN__(){}
> void _MAIN_(){}


The AT&T UNIX f77 compiler and libraries required the first of
those names to be defined if a program containing object files
created by f77 was linked with a C main routine. I assume the
other two names were tossed in because of linking requirements
of derivative FORTRAN 77 implementations.

Sincerely,
Bob Corbett
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com