i switch from windows 10 to ubuntu recently and installed codeblocks using ubuntu software center assuming without mingw. i downloaded mingw separately but it seems codeblocks cant find and use it.
i'm including photos for you to see.
https://imgur.com/WQ2wGWp
https://imgur.com/W1llVlJ
MinGW is a windows port of GCC, it has no meaning in Linux. You must install build-essential:
sudo apt install build-essential