Author Topic: help please::Fatal Error:No such file or directory  (Read 8080 times)

ferro88and

  • Guest
help please::Fatal Error:No such file or directory
« 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]

Offline franko

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: help please::Fatal Error:No such file or directory
« Reply #1 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

Offline travlealone

  • Single posting newcomer
  • *
  • Posts: 3
Re: help please::Fatal Error:No such file or directory
« Reply #2 on: April 16, 2015, 08:23:56 am »
I also have the same problem ,anyone can help?

Offline travlealone

  • Single posting newcomer
  • *
  • Posts: 3
Re: help please::Fatal Error:No such file or directory
« Reply #3 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: help please::Fatal Error:No such file or directory
« Reply #4 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?
(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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: help please::Fatal Error:No such file or directory
« Reply #5 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

Tim S.
« Last Edit: April 16, 2015, 02:03:51 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline travlealone

  • Single posting newcomer
  • *
  • Posts: 3
Re: help please::Fatal Error:No such file or directory
« Reply #6 on: April 16, 2015, 05:35:48 pm »
thank your guys very much ;) ;),the problem has been solved

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: help please::Fatal Error:No such file or directory
« Reply #7 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.
(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!]