Question

I am trying to use the Crypto++ Library for AES encryption/decryption. Installation went on well, and I created a Project in Eclipse. In the Project Explorer, under the "includes" category, I can see /usr/include/crypt.h, /usr/include/crypt++/aes.h and /usr/include/cryptpp/aes.h.

When I type #include <aes.h>, Eclipse interprets it as an "Unresolved Inclusion". On the one hand, it seems normal because aes.h is not located directly in the /usr/include directory. On the other hand, on every Tutorial I have found they seem to #include aes.h; neither do they refer to crypto++/aes.h nor to cryptopp/aes.h.

I have one year's experience in C and C++ using gedit, but this is my first attempt to use Eclipse. I have installed the C/C++ Development Plugin, and the include directory settings seem to be correct. Is there something I am missing?

Was it helpful?

Solution

As you you've said that's normal since the file are located in a folder inside /usr/include, not directly into the include directory, anyway this has nothing to do with Eclipse or any other IDE but it's just a matter of GCC and the enviromental variable "C_INCLUDE_PATH" if you're using plain C or "CPLUS_INCLUDE_PATH" if you're with g++, if you really don't want to use the #include cryptopp/aes.h sintax just append the /usr/include/cryptopp folder to the appropriate enviromental variable, maybe with a line like this one in your .bashrc file

C_INCLUDE_PATH= $C_INCLUDE_PATH:/usr/include/cryptopp

anyway, I don't really see any problem in using #include cryptopp/aes.h

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top