You were right, it works when I adjust all relevant paths. Tried that before but must have messed up something.
One problem was that I don't have the env vars integrated into the system, and C::B doesn't execute vcvars32.bat automatically. Codeblocks-defined environment vars don't work because they're probably not passed to the spawned processes (link.exe).
My main problem was 'cdb.exe' not found, but now I realized it's an external tool. Now the only problem is, it won't debug...
Microsoft (R) Windows Debugger Version 6.7.0005.1
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: ./qwerty.exe
Symbol search path is: D:/testik/qwerty/
Executable search path is:
ModLoad: 00000000`00400000 00000000`00409000 qwerty.exe
ModLoad: 00000000`76e30000 00000000`76faa000 ntdll.dll
ModLoad: 00000000`76fe0000 00000000`77130000 ntdll32.dll
ModLoad: 00000000`75150000 00000000`75195000 C:\Windows\system32\wow64.dll
ModLoad: 00000000`75060000 00000000`750aa000 C:\Windows\system32\wow64win.dll
ModLoad: 00000000`751b0000 00000000`751b9000 C:\Windows\system32\wow64cpu.dll
(1bc.22c): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
00000000`76e7fdf0 cc int 3
*** WARNING: Unable to verify checksum for qwerty.exe
Which I'm trying to resolve right now by searching these forums.
EDIT: this thing has been mentioned like 10 times, but noone ever answered :X