Is it possible if you could write the error you are getting word to word?
So, did you have to download DirectInput separately or was it already there with DirectX.
||=== Build: Debug in Controller Mapper (compiler: GNU GCC Compiler) ===|
C:\Users\Caleb\Documents\Projects\Controller Mapper\dinput.h|43|note: #pragma message: C:/Users/Caleb/Documents/Projects/Controller Mapper/dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800|
C:\Users\Caleb\Documents\Projects\Controller Mapper\main.cpp||In function 'int main()':|
C:\Users\Caleb\Documents\Projects\Controller Mapper\main.cpp|10|error: 'EnumDevices' was not declared in this scope|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Now I get it. You did not link DirectInput's library to CodeBlocks. So it would detect 'EnumDevices' as a liable phrase with no function at all.
There should be some files with extensions '.llb' or '.a' that are compulsory to be linked to the IDE.