No idea how to do it through Anjuta. Nor do I know how to do that with Eclipse, or (nor?) Kdevelop. I *can* however write a makefile. Regarding makefiles, it's like Han Solo said, "She may not look like much, but she's got it where it counts, kid."
In general, you should first learn the actual compile/link commands themselves (as foo_bar_foo described), and only then -- only after it becomes boring 2nd-nature routine rather than a daunting and confusing task -- should you resort to automatic build tools.
Take the time to learn make/scons/jam/ant/whatever, and type in the g++ commands into your build files yourself. You'll be glad you learned.