News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

help please::Fatal Error:No such file or directory

Started by ferro88and, March 12, 2013, 10:41:51 AM

Previous topic - Next topic

ferro88and

Hi friends!
While i try to compil a simple program on Fortran 90 i get this error:
||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:


    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]

franko

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

travlealone


travlealone

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.

oBFusCATed

Can you compile the program from the command line?
Have you tried to put the project in a path that has no special characters?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

#5
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

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

travlealone

thank your guys very much ;) ;),the problem has been solved

oBFusCATed

It would be good if you share the solution, so future users can benefit from your experience.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]