How to compile with a conventional Makefile in BOOST

Hi, I would like to know if someone could show me how to compile and build with a conventional Makefile (linux-gnu-gcc) for the BOOST GRAPH LIBRARY. I'm not sure of which lib files to link and what are the needed flags. I have to do by Makefile because I also use another library other than BOOST. Thanks. THL -- ___________________________________________________ Play 100s of games for FREE! http://games.mail.com/

On Sat, 26 Nov 2005 13:32:57 -0500, Ace Bluedust wrote
Hi, I would like to know if someone could show me how to compile and build with a conventional Makefile (linux-gnu-gcc) for the BOOST GRAPH LIBRARY. I'm not sure of which lib files to link and what are the needed flags. I have to do by Makefile because I also use another library other than BOOST.
I recommend against messing with makefiles for Boost libs -- it's a science experiment that you will sink a bunch of time into. Best to follow the boost.build instructions if you need to build something in boost. In the case of Boost.graph, however, it is mostly a header only library with the exception of the graphviz extensions. If you don't need the graphviz part your job is even simplier -- unpack the files and include the header. Jeff

"Jeff Garland" <jeff@crystalclearsoftware.com> writes:
On Sat, 26 Nov 2005 13:32:57 -0500, Ace Bluedust wrote
Hi, I would like to know if someone could show me how to compile and build with a conventional Makefile (linux-gnu-gcc) for the BOOST GRAPH LIBRARY. I'm not sure of which lib files to link and what are the needed flags. I have to do by Makefile because I also use another library other than BOOST.
I recommend against messing with makefiles for Boost libs -- it's a science experiment that you will sink a bunch of time into. Best to follow the boost.build instructions if you need to build something in boost. In the case of Boost.graph, however, it is mostly a header only library with the exception of the graphviz extensions. If you don't need the graphviz part your job is even simplier -- unpack the files and include the header.
Actually, now even the graphviz stuff is handled by a header-only Spirit parser. -- Dave Abrahams Boost Consulting www.boost-consulting.com

Ace Bluedust wrote:
Hi, I would like to know if someone could show me how to compile and build with a conventional Makefile (linux-gnu-gcc) for the BOOST GRAPH LIBRARY. I'm not sure of which lib files to link and what are the needed flags. I have to do by Makefile because I also use another library other than BOOST.
Here's a summary of what I have done for my Linux builds. I'm assuming you define the following variables in your makefile: BOOSTDIR (path to where you have installed Boost) INCLPATH (include path) LFLAGS (link flags) LIBS (additional libraries used to link the program) Then: * Build the Boost graph library according to the Boost documentation, if you haven't already done so. * In INCLPATH, put -isystem $(BOOSTDIR)/include/boost-<BOOSTVERSION> replacing <BOOSTVERSION> with the version of Boost you are using (eg, 1_33) * In LFLAGS, put -L $(BOOSTDIR)/lib so the linker can locate the Boost libraries * In LIBS, put -l<library_name> replacing <library_name> with the version of the graph library (debug/release build? single-/multi-threaded?) that you need from $(BOOSTDIR)/lib That should be it. It's no different from linking against any other library really. Paul

With the latest version of boost there is no graph.lib needed anymore (the DOT parser has a new brother based on spirit). Gordon. "Ace Bluedust" <bluedusto@mail.com> wrote in message news:20051126183257.59BDB164299@ws1-4.us4.outblaze.com... Hi, I would like to know if someone could show me how to compile and build with a conventional Makefile (linux-gnu-gcc) for the BOOST GRAPH LIBRARY. I'm not sure of which lib files to link and what are the needed flags. I have to do by Makefile because I also use another library other than BOOST. Thanks. THL -- ___________________________________________________ Play 100s of games for FREE! http://games.mail.com/ --------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (5)
-
Ace Bluedust
-
David Abrahams
-
Gordon Smith
-
Jeff Garland
-
Paul Giaccone