1010
1010

Reputation: 79

how to link xmlsec/xmlsec.h in make file using c

src/file.c:17:27: fatal error: xmlsec/xmlsec.h: No such file or directory compilation terminated. make: * [src/file.o] Error 1

installed apt-get install libxmlsec-dev and after using locate command the location is usr/include/xmlsec1/xmlsec/xmlsec.h

Upvotes: 1

Views: 1938

Answers (1)

REA_ANDREW
REA_ANDREW

Reputation: 10774

Use pkg-config so that you can see the correct location of the headers etc...

pkg-config --cflags --libs xmlsec1

This should output something similar to:

-DXMLSEC_CRYPTO=\"openssl\" -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T
-DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 
-I/usr/include/xmlsec1  -DXMLSEC_OPENSSL_100=1 -DXMLSEC_CRYPTO_OPENSSL=1 
-I/usr/include/libxml2 -lxmlsec1-openssl -lxmlsec1 -lssl -lcrypto -lxslt  -lxml2

The error you are getting seems to simply be when header file cannot be located.

Upvotes: 0

Related Questions