Pourriez vous me conseiller un tuto avec des exemples?
Et en guise de hello world j'ai trouvé ca:
*-----------------------------------------------------------------* Program CONVRT * * This program reads an input value in kilowatt-hours, * and then converts it to joules. Both values are printed. * Real KWH, JOULES * Print*, 'Enter energy in kilowatt-hours' Read*, KWH * JOULES = 3.6E+06*KWH * Print 5, KWH, JOULES 5 FORMAT(1X,F6.2,' Kilowatt-hours = ',E9.2, ' Joules') * end *-----------------------------------------------------------------*
je le compile en faisant
gcc test.f
mais je dois oublier un truc parce que:
[root@a090portable f]# gcc test.f /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x18): dans la fonction « _start »: : undefined reference to `main' /tmp/cce5Cmdw.o(.text+0xf): dans la fonction « MAIN__ »: : undefined reference to `s_wsle' /tmp/cce5Cmdw.o(.text+0x28): dans la fonction « MAIN__ »: : undefined reference to `do_lio' /tmp/cce5Cmdw.o(.text+0x30): dans la fonction « MAIN__ »: : undefined reference to `e_wsle' /tmp/cce5Cmdw.o(.text+0x3d): dans la fonction « MAIN__ »: : undefined reference to `s_rsle' /tmp/cce5Cmdw.o(.text+0x55): dans la fonction « MAIN__ »: : undefined reference to `do_lio' /tmp/cce5Cmdw.o(.text+0x5d): dans la fonction « MAIN__ »: : undefined reference to `e_rsle' /tmp/cce5Cmdw.o(.text+0x78): dans la fonction « MAIN__ »: : undefined reference to `s_wsfe' /tmp/cce5Cmdw.o(.text+0x8e): dans la fonction « MAIN__ »: : undefined reference to `do_fio' /tmp/cce5Cmdw.o(.text+0xa4): dans la fonction « MAIN__ »: : undefined reference to `do_fio' /tmp/cce5Cmdw.o(.text+0xac): dans la fonction « MAIN__ »: : undefined reference to `e_wsfe' /tmp/cce5Cmdw.o(.text+0xbb): dans la fonction « MAIN__ »: : undefined reference to `s_stop' collect2: ld a retourné 1 code d'état d'exécution [root@a090portable f]#
qu'est ce que j'ai pas fait?