Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Absoft g77 linking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Absoft g77 linking



> Message: 1
> Date: Tue, 3 Sep 2002 17:18:36 -0400
> Subject: Absoft g77 linking
> From: Gaurav Khanna <email@hidden>
> To: email@hidden
>
> Does anyone how I could link fortran files (compiled using Absoft
> Fortran) with g77 .. and vice-versa?
>
> Thanks!
> Gaurav
>

Gaurav,

I have linked g77 objects (.o files) with the Absoft compiler, and I assume
it also works the other way around. Just stick the .o file in the Absoft
compile command. For instance, say you have g77code.f to be compiled with
g77, and abscode.f to be compiled with Absoft F77, linking in g77code:

g77 g77code.f -c
f77 abscode.f g77code.o

Of course, include any other relevant options. The other thing to be aware
of is case sensitivity and trailing underscores. If you name a function or
subroutine as "mysub" in g77, it needs to be referenced as "mysub_" from
Absoft code. Absoft f77 allows case sensitivity, so keep track of that, or
be sure to use the -f (force to lower case) or -N109 (upper case) options.
Absoft F90/95 forces to upper case by default. With Absoft F77, you can
globally append an underscore to each subroutine/function with the -N15
option if that's easier than naming them manually.

I have not linked Absoft objects into g77, but they are obviously
compatible, so it should work.

Craig

--
Dr. Craig Hunter
NASA Langley Research Center
AAAC/Configuration Aerodynamics Branch
email@hidden
(757) 864-3020
(G4 Cube - OS X)
_______________________________________________
fortran-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/fortran-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.