🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ����ȸ Tue, 05 May 1998 00:00
Re: ��RedHat5.0����gcc��fort77�������ʱ������
#959
Author: ����ȸ
Date: Tue, 05 May 1998 00:00
54 lines
2484 bytes
> ==> Yuguang_Xiong(С��ë)                    ˵��: 
> �� �� �ˣ�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�±����û����������. 
> 	����ë�����׳������� ? 
��Ҫ libf2c , �����û����ȷ��װ fort77 

--
�� ��Դ: �й�ƴ�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