encryption - Qt | Can't get any cryptographic library to work -


over week tried implement every cryptography-library possibly find qt encrypt files , strings, seems impossible me. started clean ubuntu-installation, updated everything, installed qt , openssl allready installed on ubuntu, tried start that. i've read tutorials, tried examples, nothing did seemed solve "undefined reference" problem. googled right libs maybe had add project file, nothing worked. openssl didn't work me, googled way through "qca", "crypto++", "mcrypt" , public librarys found. first 3 got "undefined reference" errors again , other librarys either had depracted code or wrong conversions between data types in code itself.

i'm new whole cryptographic stuff, can't work @ all. awesome if release me pain , me library working clean ubuntu installation qt. have wrong....it can't tutorials found on web working fine everbody else.

as example....i installed packages "libmcrypt-dev", "libmcrypt4" , "mcrypt" , followed code example here: mcrypt linux how use rijndael 256 cbc include works fine, header file can found , code mcrypt classes highlighted, should work, right? try compile code, "undefined reference" errors in every line uses function mcrypt. happened other librarys....though can't find missing others did. no additional includes stated anywhere nor additional library-references i'd have include in project file.

what doing wrong? fear don't have show guys either, except want see huge list "undefined reference" errors. :-/

if try that:

#include <mcrypt.h>  int main() {     mcrypt td = mcrypt_module_open("rijndael-256", null, "cbc", null);     mcrypt_module_close(td); } 

i following errors

error: undefined reference `mcrypt_module_open' error: undefined reference `mcrypt_module_close' 

project file:

qt       += core  qt       -= gui  target = untitled config   += console config   -= app_bundle  template = app   sources += main.cpp 

error: undefined reference says, linker can not find library itself. has headers files, have included, not see source. fix this, have tell linker, sources are, add in *.pro file add line, example libmcrypt library:

libs += -l/path/to -lmcrypt

in linux, if have installed apt-get install or similar, -l not needed


Comments