How to include math lib of C++ into codeblocks

Well, codeblocks is really easy to use and I really like it.
But when I need to use some math calculation, ex: pow(), sqrt()…
that supposed to be standard functions, all missed in CB lib.
I don’t know how to include original C++ lib into my CB project,
Does anybody can solve this? thanks a lot!


hi kaykay,

Did you follow the oF FAT setup at this page:

Check if you installed MingW correctly and you copied the files
from .zip you find at the setup page.

In C::B check the Settings>Compiler & Debugger + Global variable settings.

Hope this helps!


@kaykay can you post the errors? are you sure they are errors not warnings (about precision) ?

cmath should be no problem: powf, sqrt, etc.

  • z