Article View: cn.bbs.comp.program
Article #958��RedHat5.0����gcc��fort77�������ʱ������
From: С��ë
Date: Tue, 05 May 1998 00:00
Date: Tue, 05 May 1998 00:00
82 lines
2441 bytes
2441 bytes
�� �� �ˣ�Yuguang_Xiong(С��ë) ������ƣ�Linux[5545]
������Ҫ����Redhat5.0������C��Fortran����������
Դ �� վ���й�ƴ�BBSվ(Mon, 04 May 1998 20:37:39)
����RedHat 5.0�Լ���gcc��fort77������������,
������: mm.c
#include <stdio.h>
void show_();
int main()
{
printf( "C showed\n" );
show_();
return 0;
}
�ӳ���: tt.f
SUBROUTINE SHOW
PRINT*, 'FORTRAN SHOWED!'
RETURN
END
��������:
gcc -c mm.c
gcc -c tt.c
gcc mm.o tt.o -lf2c -lm -o mm
/usr/lib/libf2c.so: undefined reference to `MAIN__'
make: *** [mm] Error 1
����, �����������Ӳ���.
�� fort77 -c -k tt.f ��� tt.c ����:
/* -- translated by f2c (version 19970805).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__9 = 9;
static integer c__1 = 1;
/* Subroutine */ int show_()
{
/* Builtin functions */
integer s_wsle(), do_lio(), e_wsle();
/* Fortran I/O blocks */
static cilist io___1 = { 0, 6, 0, 0, 0 };
s_wsle(&io___1);
do_lio(&c__9, &c__1, "FORTRAN SHOWED!", 15L);
e_wsle();
return 0;
} /* show_ */
û�з���ʲô���Ⱑ.
ͬ��ij���, ��Slackware�±����û����������.
����ë�����׳������� ?
--
[36;49m------------->[0m
[33;49m--[32;49mС[33;49m-[32;49m��[33;49m-[32;49më[33;49m--->[0m
[31;49m------------->[0m
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID:
<980505.yWXK8$PBBS@bbs.ustc.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,ed99b731c472ef1e,start X-Google-Attributes: gidfc86e,public From: Yuguang_Xiong@bbs.ustc.edu.cn (С��ë) Subject: ��RedHat5.0����gcc��fort77�������ʱ������ Date: 1998/05/05 Message-ID: <980505.yWXK8$PBBS@bbs.ustc.edu.cn> X-Deja-AN: 350326092 Organization: �й�ƴ�BBSվ Newsgroups: cn.bbs.comp.program