Qt Code:
  1. uint8_t *data = (uint8_t *) inputData.data();
  2. uint8_t *key = (uint8_t *) keyData.data();
  3.  
  4. struct AES_ctx ctx;
  5. AES_init_ctx(&ctx, key);
  6. AES_ECB_encrypt(&ctx, data);
To copy to clipboard, switch view to plain text mode 

I got a message error:
error: undefined reference to `AES_init_ctx(AES_ctx*, unsigned char const*)'
error: undefined reference to `AES_ECB_encrypt(AES_ctx*, unsigned char*)'
I think that uint8_t changed unsigned char by Qt.
But uint8_t is member of stdint lib
Qt Code:
  1. #include <stdint.h>
To copy to clipboard, switch view to plain text mode