HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to call a fortran code from a c code??
Operating System - HP-UX
1834142
Members
2167
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 06:51 PM
10-31-2001 06:51 PM
How to call a fortran code from a c code??
I tried to call a Fortran code from a C code. A makefile
was written for that purpose in the past, but it is specifically for SGI machine
with irix6r10. Is there anyone who knows how to change the following variables:
CFLAGS_HPUX11=
FFLAGS_HPUX11=
LDFLAGS_HPUX11=
LIBS_HPUX11=
such that they are equilavent to
CFLAGS_IRIX6R10= -KPIC -O -n32
FFLAGS_IRIX6R10= -O -KPIC -n32
LDFLAGS_IRIX6R10= -shared -n32
LIBS_IRIX6R10= -lftn -lm -lc
Thanks!
was written for that purpose in the past, but it is specifically for SGI machine
with irix6r10. Is there anyone who knows how to change the following variables:
CFLAGS_HPUX11=
FFLAGS_HPUX11=
LDFLAGS_HPUX11=
LIBS_HPUX11=
such that they are equilavent to
CFLAGS_IRIX6R10= -KPIC -O -n32
FFLAGS_IRIX6R10= -O -KPIC -n32
LDFLAGS_IRIX6R10= -shared -n32
LIBS_IRIX6R10= -lftn -lm -lc
Thanks!
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2001 10:56 AM
11-01-2001 10:56 AM
Re: How to call a fortran code from a c code??
The HP C and FORTRAN manuals at docs.hp.com
have extensive info on using C and FORTRAN
together.
CFLAGS_HPUX11= +z -O
FFLAGS_HPUX11= +z -O
LDFLAGS_HPUX11= -a shared
LIBS_HPUX11= -lcl -lm -lc
The linker will warn you if you need to change the
+z options to +Z.
The SGI compiler most likely adds underscores
to FORTRAN symbol names, so you may need
to add +ppu to FFLAGS. Check the f77 or f90
man page to see what the default is for your
compiler.
For some reason the HP-UX FORTRAN
runtime library is called "libcl", hence the "-lcl".
The "-lc" is the C runtime library and is usually
automatically added by the linker, but I guess it
doesn't hurt to say it explicitly.
have extensive info on using C and FORTRAN
together.
CFLAGS_HPUX11= +z -O
FFLAGS_HPUX11= +z -O
LDFLAGS_HPUX11= -a shared
LIBS_HPUX11= -lcl -lm -lc
The linker will warn you if you need to change the
+z options to +Z.
The SGI compiler most likely adds underscores
to FORTRAN symbol names, so you may need
to add +ppu to FFLAGS. Check the f77 or f90
man page to see what the default is for your
compiler.
For some reason the HP-UX FORTRAN
runtime library is called "libcl", hence the "-lcl".
The "-lc" is the C runtime library and is usually
automatically added by the linker, but I guess it
doesn't hurt to say it explicitly.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP