Don't know what details you expect. I do everything default way. No quirks and cludges here.
OK. What I done is:
1) Just installed WinAVR, AVR-Studio, CodeBlocks.
2) Configured GNU AVR GCC compiler in C::B 'compiler and debugger' menu
3) Created project and wrote a program
4) Compile it. Done.
Here is example of compilation output:
Running project pre-build steps
avr-gcc.exe -mmcu=atmega32 -O3 -Wall -std=gnu99 -fno-strict-aliasing -DF_CPU=14745600UL -gdwarf-2 -W -Wall -std=gnu99 -I"C:\Program Files\Atmel\AVR Studio 5.0\extensions\Application\AVR Toolchain\avr\include" -S main.c -o bin\Debug\main.s
-------------- Build: Debug in KIv05 pH ---------------
avr-gcc.exe -mmcu=atmega32 -O3 -Wall -std=gnu99 -fno-strict-aliasing -DF_CPU=14745600UL -gdwarf-2 -W -Wall -std=gnu99 -I"C:\Program Files\Atmel\AVR Studio 5.0\extensions\Application\AVR Toolchain\avr\include" -c main.c -o obj\Debug\main.o
avr-g++.exe -o bin\Debug\KIv05_pH.elf obj\Debug\main.o -mmcu=atmega32 -Wl,-Map=bin\Debug\KIv05_pH.elf.map,--cref -lm -lm
Output size is 55,61 KB
Running project post-build steps
avr-objcopy -O ihex -R .eeprom -R .eesafe bin\Debug\KIv05_pH.elf bin\Debug\KIv05_pH.elf.hex
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex bin\Debug\KIv05_pH.elf bin\Debug\KIv05_pH.elf.eep.hex
avr-size --mcu=atmega32 --format=avr bin\Debug\KIv05_pH.elf
AVR Memory Usage
----------------
Device: atmega32
Program: 9448 bytes (28.8% Full)
(.text + .data + .bootloader)
Data: 148 bytes (7.2% Full)
(.data + .bss + .noinit)
cmd /R "avr-objdump bin\Debug\KIv05_pH.elf -h -S > bin\Debug\KIv05_pH.elf.lss"
Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 0 warnings
Note no "-lc" in linking. There are two!! "-lm" but it's completely different story.
Maybe you have something wrong with WinAVR or Windows PATHs/Registry?
a)Try reinstall WinAVR?
b)If doesn't help - look at Windows PATH for avr-gcc. What it shows?