Results 1 to 5 of 5

Thread: uint8_t don't used in Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2018
    Posts
    19
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default uint8_t don't used in Qt

    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 

  2. #2
    Join Date
    Jul 2012
    Posts
    247
    Thanks
    29
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: uint8_t don't used in Qt

    more likely, you didnt add aes.c to your project.

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: uint8_t don't used in Qt

    Qt has nothing to do with it. This a line from stdint.h :
    Qt Code:
    1. typedef unsigned char uint8_t;
    To copy to clipboard, switch view to plain text mode 
    You do not link the correct library.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.