tags:

views:

137

answers:

1

I'm wondering if there are any simple ways to link boost libraries (all or individual) via some entry like....

-lSDL_ttf

The above links SDL's True Type Font library. Can this be done with boost? If so, I'm not sure what file I'm linking for to link. I'm currently using boost_1_40_0.

If this isn't possible, or there are better ways to do this, I'd be happy to hear them.

P.S. I'm using the CodeBlocks IDE.

+2  A: 

Most boost libraries don't need to be linked as they are header only.

For those that are not header only, see the instructions here on the naming conventions and make sure you put the folder containing the boost libraries in your library search path if you want to avoid specifying it explicitly.

Georg Fritzsche
Well, I'm getting an error regarding an undefined reference to boost::system::get_system_category(). What's the reasoning behind that?
Anonymous
You probably missed linking to boost.system - something like `-lboost_system-*foo*`
Georg Fritzsche
Ah thanks. Now getting error regarding undefined reference to WinMain@16. Haven't searched it yet though so I'll do that first.
Anonymous
I had to link to both. I'm reading that the WinMain@16 error occurs when you've created the wrong kind of project. It's current type is a GUI application, but that is what it is supposed to be ( I recently switched OS's, so I'm having to set things up again. I should probably write it down this time. ) I'm unsure what the problem could be.
Anonymous
Had to use -lmingw32.
Anonymous