User forums > Using Code::Blocks

Compiling fortran77 project using codeblocks

(1/2) > >>

krispy:
I am running Code::Blocks version 16.01mingw_fortran on Windows 10. The compiler I use is GNU Fortran compiler that came alongwith the codeblocks-16.01mingw_fortran-setup.exe file

When I try to build the code

I get the message
=== Build: Win32 Release in TYPE 862 (name of the sourcecode file) (compiler: GNU Fortran Compiler)===
=== Build failed: 0 error(s), o warning(s) (0 minutes, 0 second(s))===
in Build Messages


Build log:
-------------- Build: Win32 Release in TYPE 862 (compiler: GNU Fortran Compiler)---------------

g++.exe -JRelease  /MT /W3 /GX /O2 /DWIN32 /DNDEBUG /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD     -c "C:\Program Files (x86)\Trnsys16\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.for" -o "Release\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.o"
g++.exe: error: /MT: No such file or directory
g++.exe: error: /W3: No such file or directory
g++.exe: error: /GX: No such file or directory
g++.exe: error: /O2: No such file or directory
g++.exe: error: /DWIN32: No such file or directory
g++.exe: error: /DNDEBUG: No such file or directory
g++.exe: error: /D_WINDOWS: No such file or directory
g++.exe: error: /D_MBCS: No such file or directory
g++.exe: error: /D_USRDLL: No such file or directory
g++.exe: error: /YX: No such file or directory
g++.exe: error: /FD: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 


I have already tried
Various other  configurations as suggested online and various youtube videos
but none of them worked.
I have another system with windows 7 and I'm flexible downloading other OS or using different method on it if it needed

This is my first time coding so I'm absolutely unaware about what exactly needs to be carried out and why. Please help me with what needs to be done. References to suitable steps or to obtain knowledge needed for compiling the code would be appreciated. 

sodev:
These look like MSVC command line switches, it seems like your compiler configuration is pretty much messed up. Did you change anything in the advanced compiler settings? That CodeBlocks version is also pretty dated, not sure if this is a bug that got already fixed.

My best bet would be backup your current CodeBlocks configuration (should be under %APPDATA%\Roaming\CodeBlocks) and delete it so that it gets recreated and/or upgrade to the latest release.

krispy:
I've uninstalled and reinstalled several times and the error is pretty much the same. I read on a thread about codeblocks by darmar for fortran and tried compiling the same code this is what has popped up in the build log

-------------- Build: Win32 Release in TYPE 862 (compiler: GNU Fortran Compiler)---------------

g++.exe -JRelease  /MT /W3 /GX /O2 /DWIN32 /DNDEBUG /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD     -c "C:\Program Files (x86)\Trnsys16\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.for" -o "Release\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.o"
Execution of 'g++.exe -JRelease  /MT /W3 /GX /O2 /DWIN32 /DNDEBUG /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD     -c "C:\Program Files (x86)\Trnsys16\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.for" -o "Release\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.o"' in 'C:\Program Files (x86)\Trnsys16\SourceCode\MyComponentsSC\TYPE 862' failed.

and this is what has popped up in build messages
=== Build: win32 Release in TYPE 862 (compiler: GNU Fortran Compiler)===
Exedcution of 'g++.exe -JRelease /MT /W3 /GX /o2 /DWIN32 /DDNDEBUG /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD   -c "C:\Program Files (x86)\Trnsys16\SourceCode\MyComponents\Type 862.for" -o "Release\SourceCode\MyComponentsSC\TYPE 862\TYPE 862.o" ' in 'C:\

Miguel Gimenez:
Writing under Program files is not allowed to user programs. Change the source folder to another location and try again.

stahta01:
Your tool chain settings are completely messed up!

You need to fix them!

Reinstalling C::B does not change the tool chain settings!

Either manually fix the setting or as already suggest rename the default.conf under %APPDATA%\CodeBlocks to a new name and see if the default file is regenerated with the correct values.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version