3

I am developing a simple chat application, which use crypto++, in ubuntu. The folder for crypto++'s header files is /usr/include/crypto++/.

After I upload the source tagbar to CentOS, I found that the folder for crypto++'s header files is /usr/include/cryptopp. So in CentOS, the compiler could not find the head files for cryptopp.

Source File:

#include "crypto++/md5.h"

Configure.ac:

AC_SEARCH_LIBS([_ZTIN8CryptoPP14CBC_EncryptionE], [crypto++ cryptopp], 
        [],[AC_MSG_ERROR([avchat requires crypto++/cryptopp])])

How to make the source bundle portable both on ubuntu and centos?

Jichao
  • 40,341
  • 47
  • 125
  • 198
  • Oh yeah, that is an interesting little issue. I was always aware of the naming differences, but I never really thought about how to solve it. Maybe [symlink](http://stackoverflow.com/q/910433) the `cryptopp` directory as `crypto++` (or vice-versa)? (I try to avoid anything Autotools related because it usually results in confusing me). – jww Sep 27 '15 at 10:35
  • @jww: Thx, i have made symbol link, it works. But i wondering if there is any standard solution? – Jichao Sep 27 '15 at 11:23
  • 1
    *"... if there is any standard solution"* - well, "standard" can be fast and loose at times. Have you looked at using one of those [`pkg-config`](http://linux.die.net/man/1/pkg-config) files that distros provide? – jww Sep 27 '15 at 11:45
  • Not sure if it matters ... I checked the `CryptoPP::CBC_Encryption` test by running `_ZTIN8CryptoPP14CBC_EncryptionE` though `c++filt`. It succeeded on Debian 8, but not OS X 10.8.5 and OS X 10.5. – jww Sep 27 '15 at 11:53
  • I haven't test it OS X, thanks for your information. – Jichao Sep 27 '15 at 13:01
  • We opened an issue for this at [Issue 36: Crypto++ should provide a pkg-config for users and distros](https://github.com/weidai11/cryptopp/issues/36). I've reached out to the Debian, Fedora and Macport maintainers to provide us with advice. – jww Oct 03 '15 at 07:59

0 Answers0