User forums > Help

Not compiling before linking

(1/2) > >>

urt:
Using Code::Blocks on Windows 10, trying AVR project. The code is fine, verified by other IDE, trying to build the project and getting these messages:


--- Code: ---avr-gcc.exe -LC:\WinAVR\avr\lib -o bin\Debug\TESDTS.elf obj\Debug\fuse.o obj\Debug\main.o  -mmcu=atmega328p -Wl,-Map=bin\Debug\TESDTS.map,--cref 
avr-gcc.exe: obj\Debug\fuse.o: No such file or directory
avr-gcc.exe: obj\Debug\main.o: No such file or directory

--- End code ---

Feels to me that it doesn't compile them (no binary files to link into elf)
the compiler path is fine, any help?

Miguel Gimenez:
This is the link log, post a full rebuild log so we can see what is failing when compiling.

urt:
Build started on: 22-12-2023 at 13:22.40
Build ended on: 22-12-2023 at 13:22.40
-------------- Build: Debug in TESDTS (compiler: GNU GCC Compiler for AVR)---------------
avr-gcc.exe -LC:\WinAVR\avr\lib -o bin\Debug\TESDTS.elf obj\Debug\fuse.o obj\Debug\main.o -mmcu=atmega328p -Wl,-Map=bin\Debug\TESDTS.map,--cref
avr-gcc.exe: obj\Debug\fuse.o: No such file or directory
avr-gcc.exe: obj\Debug\main.o: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I think it really doesn't compile, this is the full build log in HTML format

Miguel Gimenez:
Did you a full rebuild log? The cleaning stage should be in the log... Please use code tags, as in the original post.

Have you set the compiler executable properly in the compiler properties?.

This page shows how executables should be configured:

--- Quote ---    C compiler: avr-gcc.exe
    c++ compiler: avr-g++.exe
    linker for dynamic : avr-g++.exe
    linker for static: avr-ar.exe

--- End quote ---

urt:
Just finished following the guide, still not helping
It can't find fuse.o / main.o

I did re-build (CTRL+F11), this is the updated output of the log:

--- Quote ---Build started on: 22-12-2023 at 13:47.53
Build ended on: 22-12-2023 at 13:47.53
-------------- Build: Debug in TESDTS (compiler: GNU GCC Compiler for AVR)---------------
avr-gcc.exe -LC:\WinAVR\avr\lib -o bin\Debug\TESDTS.elf obj\Debug\fuse.o obj\Debug\main.o -mmcu=atmega328p -Wl,-Map=bin\Debug\TESDTS.map,--cref
c:/avr-gcc-12.1.0-x64-windows/bin/../lib/gcc/avr/12.1.0/../../../../avr/bin/ld.exe: cannot find obj\Debug\fuse.o: Invalid argument
c:/avr-gcc-12.1.0-x64-windows/bin/../lib/gcc/avr/12.1.0/../../../../avr/bin/ld.exe: cannot find obj\Debug\main.o: Invalid argument
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version