Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by С��ë
Tue, 05 May 1998 00:00
��RedHat5.0����gcc��fort77�������ʱ������
Author: С��ë
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]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads