Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Linux build doesn't like reference to cstdint...
Qt 6.11 is out! See what's new in the release blog

Linux build doesn't like reference to cstdint...

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 5.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    ...as an include file. A line like this:

    @#include <cstdint>
    @

    Returns an error about needing a particular compiler flag, but:

    @#include <stdint.h>
    @

    does just fine. Can someone explain why this is?

    Thank you.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Which error and what compiler flag?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        if you google a bit about cstdint, you find "this on stackoverflow":http://stackoverflow.com/questions/3137336/difference-between-cstdint-and-tr1-cstdint .
        cstdint was not part of C99. It comes with tr1 of STL and goes to C++0x:

        bq. <tr1/cstdint> is defined, as name suggests, in TR1, while <cstdint> is defined in c++0x.

        bq. Since this stuff isn't standard yet I guess it's compiler specific so I'm talking about gcc. To compile with the non-tr1 one I must compile with -std=c++0x, but there is no such restriction when using tr1.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #4

          Gerolf: thanks for the answer. I never knew what tr1 was until I searched on it just now. Interesting stuff.

          Lukas: as you can probably guess from Gerolf's response, the error was about using some non-standard include file without the flag that enables C++0x. (I'm not booted in ubuntu right now, or I could be more specific.)

          Would I be mostly correct in assuming that this is really no big deal to me, and I can just use the tr1/ versions without repercussion?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved