User forums > Help
Problem with Build
Rishahnu:
Hi Folks,
I just installed Code::Blocks version 8.02 today, and it seems great so far, except for this problem when I try to build a project:
--- Quote ----------------- Build: Debug in RobostixStabilitySystem ---------------
Linking console executable: bin/Debug/RobostixStabilitySystem.elf
/usr/lib/libm.so: file not recognized: File format not recognized
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---
I'm using the AVR-GCC compiler version 4.3.2 in Ubuntu version 9.04, and am compiling for the ATmega128. Any suggestions?
Thanks!
stahta01:
Read the FAQ and turn on full compiler logging.
Verify the project is using correct compiler with proper project settings.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S.
Rishahnu:
Thanks for the reply!
I turned on full compiler logging and now I get the following output:
--- Quote ----------------- Build: Debug in RobostixStabilitySystem ---------------
avr-g++ -L/usr/lib -o bin/Debug/RobostixStabilitySystem.elf obj/Debug/main.o -mmcu=atmega128 -Wl,-Map=bin/Debug/RobostixStabilitySystem.elf.map,--cref
/usr/lib/libm.so: file not recognized: File format not recognized
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---
stahta01:
A wild guess from a windows user; but, does "/usr/lib" contain the proper libraries for the embedded AVR compiler?
Tim S.
Jenna:
Is your system 64- or 32-bit ?
I'm not sure whether the avr-cross-linker should link against the systems libm.so, but it might be correct.
But if you have a 64-bit and need 32 it will not work.
In this case you need the 32-bit libs also, the package you need in this case is most likely ia32-libs-dev.
And you should use /usr/lib32/ as linker-searchpath in this case.
Please be aware, that all I posted is only correct, if the cross-compiler uses the systems libc6 and is 64-bit.
Most likely all wrong.
I just looked into the debian package list.
Do you have avr-libc installed ?
--- Quote from: description for avr-libc ---Standard C library for Atmel AVR development
Standard library used to the development of C programs for the
Atmel AVR micro controllers. This package contains static
libraries as well as the header files needed.
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version