Thank you, however, now I am still getting the initial problem. (Undefined reference to _imp___(something)).
I am working in Code::Blocks 17.12, on Windows 10. I am linking 3 screenshots, to verify, that I've set everything up the way it should be.
I've got the appropriate folder path given in all three sections under Search Directories -> Compiler and Linker.
In Program FIles (x86)\CodeBlocks\MinGW\bin I've got both libgcc_s_dw2-1.dll as well as libgcc_s_sjlj-1.dll, so the version shouldn't be a problem. Just in case I'll share that I've installed the GCC 7.3.0 MinGW (DW2) - 32-bit version from the downloads page.