-1

Dependency Libraries: libxml >= 2.7.6 openssl >= 0.9.8 Digital Signature Generation requires an additional libraries: libXslt >= 1.1.24 libxmlsec1 >= 1.2.9

These are Dependency library. i have project code but for running the makefile required dependency libraries.

I have downloaded these libraries and copy into usr/include folder then installed. but i dont know the exact way how to add in makefile these dependency library... i m using ubuntu 11.04.

#GCC compiler

CC=gcc
CFLAGS= -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_XSLT=1 -DXMLSEC_NO_XKMS=1 -I/usr/include/libxml2 -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO=\"openssl\" -DUNIX_SOCKETS -DXML_SECURITY -DDEBUG -I/usr/include/protobuf-c-0.15  -L/usr/include/libxslt-1.1.24
LDFLAGS= -lcrypto -I/usr/include/libxml2 -lxml2     -I/usr/include/xmlsec1 -lxmlsec1 -lprotobuf-c       
LIBS=-lm

fileClient:                 
    $(CC) $(CFLAGS) $(LDFLAGS)  $(LIBS) src/main.c src/file2.c src/file3.pb-c.c -o fileClient   

clean:
        $(RM)   fileClient  *.o *~  


        #
4

1 回答 1

1

不要在Makefile你的一些标题中使用类似的代码这样做

#if LIXML_VERSION < 20800
#error too old version of libxml need 2.8.0 or newer 
#endif

并且您可能对autotools(autoconfautomake朋友) 和pkg-config

此外,最好通过制作一个.deb包来处理依赖关系管理。(所以你想要一个像这样的 Ubuntu 包libxml2-dev

于 2013-04-29T05:09:47.840 回答