Code::Blocks Forums

User forums => Help => Topic started by: ferro88and on March 12, 2013, 10:41:51 am

Title: help please::Fatal Error:No such file or directory
Post by: ferro88and on March 12, 2013, 10:41:51 am
Hi friends!
While i try to compil a simple program on Fortran 90 i get this error:
Code
||Fatal Error: Can't open module file 'D:\andrea\università\uiversitàcoseimportanti\seminarioFortran\Lezione6\lez_6_es2.os_output_dir/dati_condivisi.mod0' for writing at (1): No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

I use windows 7, with codeblock (1.13.11) and GNU fortran gpl compiler.

It ever worked until i start use MODULE...then i get the error...

This is the code if it is usefull:
Code

    MODULE dati_condivisi
        implicit none
        integer,parameter :: N=1000
        integer :: j ,nvals, i
        real, dimension (N) :: valu
        real  somma, media,x, dev

    END MODULE dati_condivisi
    program lez_6_es2


        USE dati_condivisi
        open(unit=1,file='lista_dati.txt',status='old',action='read',iostat=j)

        i=1
        if(j==0) then
            do
                read(1,*,iostat=j) valu(i)
                if(j /=0) exit
                write(*,*)valu(i),i
                i=i+1
            end do
        end if

        CALL calcola_media1
        write(*,*)'la media vale', media

        CALL calcola_deviazione1
        write(*,*)'la deviazione standard',dev



        stop
    end program lez_6_es2

    SUBROUTINE calcola_media1
        somma=0
        USE dati_condivisi
        i=1
        if(j==0) then
            do
                read(1,*,iostat=j) valu(i)
                if(j /=0) exit
                write(*,*)valu(i),i

                somma=somma+valu(i)
                i=i+1
            end do
            media=somma/(i -1)!calcolo della media
        END SUBROUTINE calcola_media1


        SUBROUTINE calcola_deviazione1
            USE dati_condivisi
            do j=1,(i-1),1
                x=x+(valu(j)-media)**2 !calcolo lo scarto quadratico medio
            end do
            dev=(x/(i -1))**0.5 !

        END SUBROUTINE calcola_deviazione1


I attached the sceen...

Thanks for any help.




[attachment deleted by admin]
Title: Re: help please::Fatal Error:No such file or directory
Post by: franko on April 03, 2015, 03:22:33 pm
Apr 3, 2015
I know this post is old, but the same exact error in codeblocks is happening to me, posted by me yesterday (Apr 2, 2015).
Just wanted to point out that this is not simply something on MY machine.
franko
Title: Re: help please::Fatal Error:No such file or directory
Post by: travlealone on April 16, 2015, 08:23:56 am
I also have the same problem ,anyone can help?
Title: Re: help please::Fatal Error:No such file or directory
Post by: travlealone on April 16, 2015, 08:56:39 am
Usually the same program(include module) could be compiled by some other compiler successfully.
I don't know why the c::B can't do this.
Title: Re: help please::Fatal Error:No such file or directory
Post by: oBFusCATed on April 16, 2015, 10:38:52 am
Can you compile the program from the command line?
Have you tried to put the project in a path that has no special characters?
Title: Re: help please::Fatal Error:No such file or directory
Post by: stahta01 on April 16, 2015, 12:09:41 pm
Try using a CB Project and do NOT use the "build file" option instead use the project build.

FYI: Somewhere I read that "build file" has this error in the last month on CB for Fortran files.

Edit: Can you post the full build log because I could NOT duplicate the error so maybe its an compiler settings issue or the fact I know nothing about how to compile FORTRAN code. http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Tim S.
Title: Re: help please::Fatal Error:No such file or directory
Post by: travlealone on April 16, 2015, 05:35:48 pm
thank your guys very much ;) ;),the problem has been solved
Title: Re: help please::Fatal Error:No such file or directory
Post by: oBFusCATed on April 16, 2015, 09:25:52 pm
It would be good if you share the solution, so future users can benefit from your experience.