Author Topic: No such file or directory "error not input file" Build filed 2 errors  (Read 56111 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #15 on: September 17, 2021, 03:24:52 pm »
main.cpp is checked

Verify both compile and link of main.cpp is enabled.

Right click on main.cpp
options -> enable both

Tim S.
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 Poruks

  • Single posting newcomer
  • *
  • Posts: 6
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #16 on: September 21, 2021, 06:27:10 pm »
They are both enabled :/

I tried out some new things in this time. Tried installing codeblocks 17.12 because i saw my university computers were running that version. When i tried compiling a program there codeblocks just crashed to desktop without any error message. When uninstalling 17.12 everything was deleted but the MinGW folder and it's contents couldnt be deleted without a restart.(might not be meaningful to my issue but worth mentioning.)

I also tried installing the Codeblocks version that doesnt come with MinGW and installed MinGW from another source. Both installations were successful and Code blocks autodetected the MinGW directory. I got the same error message as i do with the pre-packaged compiler.

Could it just be that my computer isn't compatible with something? I am using a Lenovo Legion 5 with Ryzen 5 4600H and GTX 1650 TI. Also using the newest 64bit version of Windows 10 pro

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #17 on: September 21, 2021, 07:03:08 pm »
Can you attach the .CBP file?

Offline Poruks

  • Single posting newcomer
  • *
  • Posts: 6
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #18 on: September 21, 2021, 08:16:34 pm »
I did another fresh Windows reinstall and Code Blocks is working for now. Thanks for the people who tried to help, i'll try to not disturb the balance and hope it continues to work. Trying to get this to work was way to stressful and time consuming lmao

2DEndGame

  • Guest
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #19 on: November 24, 2021, 11:52:56 pm »
hi, i'm a bigginer at coding in general and wanted to learn c++ and i can't even run the initial program of "hello world"given with the code::blocks compiler

build log:

-------------- Build: Debug in myfirstprogram (compiler: GNU GCC Compiler)---------------

g++.exe  -o bin\Debug\myfirstprogram.exe obj\Debug\main.o   
g++.exe: error: obj\Debug\main.o: No such file or directory
g++.exe: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
please can anyone help me?? i'm losing my mind i haven't even started coding....

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #20 on: November 25, 2021, 12:41:46 am »
I suggest you start by looking in the C::B manual:
    https://www.codeblocks.org/user-manual/


Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #21 on: November 25, 2021, 09:01:08 am »
Post a full rebuild log in code tags, see this for help

Offline Todesorc

  • Single posting newcomer
  • *
  • Posts: 2
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #22 on: December 30, 2021, 08:26:38 am »
Dear All,

By standard i use Visual Code for porgramming on Linux Machines, but want to try out Code::Blocks.
Well i have the same issue with the build in example under Debian 11.

I checked the log message and did the same compiling steps by hand via xterm... and it works like it should.  :D
So it seems that the origin of this issue depends on Code::Blocks.
When i checked the directorys of the project, i recognized that there is no main.o file generated in the <obj\Debug> directory.
Maybe the settings in the compiler options could be the reason ?!

Regards

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #23 on: December 30, 2021, 08:58:30 am »
Have you checked the access rights in the project folder?
Can you share your project?
can you reproduce it with a minimal hello world project?

Offline Todesorc

  • Single posting newcomer
  • *
  • Posts: 2
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #24 on: December 31, 2021, 10:04:41 am »
Hi All,

I think i have found a solution for me regarding this issue.
Situation is/was that i normally use an account with root-rights on my development machine (to make some things easier).
I reminded that i had a similar issue with root-rights with another software some time ago.
So i have setup a new user with 'non-root-rights' and well, .... now it works...  ;)

Regards

Carnel X

  • Guest
Check that the name of the folder that content your program is correct (whithout special character)

hs

  • Guest
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #26 on: June 09, 2023, 08:36:22 pm »
please help for this error in code blocks

-------------- Build: Debug in 1 (compiler: GNU GCC Compiler for AVR)---------------

avr-gcc.exe -Wall -mmcu=atmega8 -DF_CPU=16000000UL -g -IC:\WinAVR\avr\include -c fuse.c -o obj\Debug\fuse.o
avr-gcc.exe -Wall -mmcu=atmega8 -DF_CPU=16000000UL -g -IC:\WinAVR\avr\include -c main.c -o obj\Debug\main.o
avr-gcc.exe -LC:\WinAVR\avr\lib -o bin\Debug\1.elf obj\Debug\fuse.o obj\Debug\main.o  -mmcu=atmega8 -Wl,-Map=bin\Debug\1.map,--cref 
avr-gcc.exe: fatal error: cannot read spec file 'device-specs/specs-atmega8': No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
 
avr-gcc.exe: fatal error: cannot read spec file 'device-specs/specs-atmega8': No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: No such file or directory "error not input file" Build filed 2 errors
« Reply #27 on: June 10, 2023, 01:23:36 am »
To hs:

Code
-mmcu=atmega8

The above is likely wrong.

You likely want
Code
-mmcu=avr4
along with
Code
-D__AVR_ATmega8__

This info found on https://gcc.gnu.org/wiki/avr-gcc

Note: Please tell us whether a CB Wizard or you the user set these values.

Edit: Looks like the CB Wizard and Compiler settings; I am guessing both being wrong is not likely; maybe the just the linker using
Code
-mmcu=atmega8
is wrong, instead.

Tim S.
« Last Edit: June 10, 2023, 02:06:03 am 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