Code::Blocks Forums
User forums => Help => Topic started by: gio on November 14, 2013, 06:35:02 pm
-
hi,
When build and run fortran code using CodeBloks the output files (such as dati.dat) of program are saved
on home directory.
if i run the code using terminal, the output file are saved on folder where i run the code.
How can i do the same it using CodeBlocks?
-
Use a project?
-
No i'm using an empty file and save it as name_file.f90.
Open CodeBlocks, File --->New--->Empty File
I'm using CodeBlocks on Mac osx. (Sorry i forgot this information)
-
Start using a project.
The single file mode is intended for testing purposes, only.
If you have more specific needs you'll have to use a project.
-
i also used project mode but the output files are saved on home directory.
For example the program is:
program test
implicit none
open(unit=10,file='name.dat', status='replace', action='write')
write(10,*) 24
stop
end program test
The file name.dat is saved in home directory if use code blocks.
If lunch the program using the terminal with command ./test the file is saved in folder where there is the executable file