🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #959

Re: ��RedHat5.0����gcc��fort77�������ʱ������

#959
From: ����ȸ
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]
Technical Details
Message-ID: <980505.yWYjq$PBBS@bbs.ustc.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: fc86e,ed99b731c472ef1e
X-Google-Attributes: gidfc86e,public
From: Lark_Wang@bbs.ustc.edu.cn (����ȸ)
Subject: Re: ��RedHat5.0����gcc��fort77�������ʱ������
Date: 1998/05/05
Message-ID: <980505.yWYjq$PBBS@bbs.ustc.edu.cn>
X-Deja-AN: 350338688
Organization: �й�ƴ�BBSվ
Newsgroups: cn.bbs.comp.program