Author Topic: 20.03 fortan ||= Build file: "no target" in "no project" (compiler: unknown) =  (Read 3039 times)

Offline cfl47

  • Single posting newcomer
  • *
  • Posts: 2
I have been trying to install Codeblock 20.03.  I thought it installed tried to run a simple fortran program when I did build and run I got the following:
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

g++.exe   -c C:\Users\frank\OneDrive\Desktop\test.f90 -o C:\Users\frank\OneDrive\Desktop\test.o
g++.exe  -o C:\Users\frank\OneDrive\Desktop\test.exe C:\Users\frank\OneDrive\Desktop\test.o   
C:\Users\frank\OneDrive\Desktop\test.o:test.f90:(.text+0x53): undefined reference to `_gfortran_st_write'
C:\Users\frank\OneDrive\Desktop\test.o:test.f90:(.text+0x6c): undefined reference to `_gfortran_transfer_character_write'
C:\Users\frank\OneDrive\Desktop\test.o:test.f90:(.text+0x78): undefined reference to `_gfortran_st_write_done'
I then tried to remove Codeblock and reinstall got into more problems.  How can I uninstall codeblock and remove everything?  Got message need to have adminstrator authorization to remove some.  I am mot sure what I hanging around on my computer now.  Need a method todo a complete removal. I am on a 64 machine where should I be storing the download?  I am lost.

Offline nenin

  • Almost regular
  • **
  • Posts: 227
Did you create fortran project?
« Last Edit: October 31, 2023, 09:23:19 am by nenin »

Offline gd_on

  • Lives here!
  • ****
  • Posts: 799
You have also to configure a fortran compiler (anf of course use it in your project), normally gfortran for gnu distribution. Have a look in the codeblocks manual. G++ is normally used for c++ but is also able to compile fortran, but at link time, you need gfortran. See paragraph 5.2.3 in the pdf (or chm documentation file).
« Last Edit: October 31, 2023, 01:01:12 pm by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.5 (tests with 3.3), Msys2 Compilers 14.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).