Re: [libxml++] Makefile



>>>>> "SR" == Simon Reye <sreye indauto com au> writes:

Hi!

 SR> I'm rather new to c++ development on Linux and am having trouble
 SR> just compiling and linking some of the simple example programs
 SR> for libxml++.  Does anyone have a simple Makefile that has the
 SR> necessary include and library settings to build a libxml++
 SR> program.

The pkg-config system takes care of all the hard stuff for you.
Assuming you use gmake, something like this, where progname is the
program you want to compile should be fine:

CXXFLAGS+= $(shell pkg-config --cflags libxml++-2.6)
LDFLAGS+= $(shell pkg-config --libs libxml++-2.6)

OBJS= ... local .o files ...

progname: $(OBJS)
        $(CXX) -o $@ $(LDFLAGS) $(OJBS)


-- 
Rasmus Kaj --+-- rasmus kaj se --+-- http://www.stacken.kth.se/~kaj/
I'm on a seafood diet -- I see food and I eat it




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]