Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. [Solved][Moved] Can not use ioctl in Qt 4
Forum Update on Monday, May 27th 2025

[Solved][Moved] Can not use ioctl in Qt 4

Scheduled Pinned Locked Moved C++ Gurus
7 Posts 4 Posters 6.9k Views
  • 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.
  • V Offline
    V Offline
    vkonstantinov
    wrote on 7 Dec 2011, 03:54 last edited by
    #1

    Hi all. Trying to call ioctl function in Qt, Receive the error message ioctl not declared in this scope. Searched for ioctl in include directory - nothing, as well as iostl.h. Any advises. Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on 7 Dec 2011, 04:20 last edited by
      #2

      What has that to do with Qt exactly? Could you double check your toolchain?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vkonstantinov
        wrote on 7 Dec 2011, 04:26 last edited by
        #3

        The task is to read/write data to tape, to provide some manimulation with tape such as write TM, go over TM, etc. In CGG i used ioctl function.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 7 Dec 2011, 10:52 last edited by
          #4

          Do you include the right headers?

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vkonstantinov
            wrote on 7 Dec 2011, 11:07 last edited by
            #5

            Yes, ioctl.h could not be found. It is fcntl.h but as far as i understand it is for read / write fuctions

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on 7 Dec 2011, 11:53 last edited by
              #6

              I moved this to the C++ Gurus forum, as it has absolutely nothing to do with Qt. This is a pure C/C++ problem.

              try as the man pages ("Linux":http://linux.die.net/man/2/ioctl, "FreeBSD":http://www.freebsd.org/cgi/man.cgi?query=ioctl&sektion=2) suggest:

              @
              #include <sys/ioctl.h>
              @

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vkonstantinov
                wrote on 8 Dec 2011, 09:27 last edited by
                #7

                Thank you. It's ok now.

                1 Reply Last reply
                0

                1/7

                7 Dec 2011, 03:54

                • Login

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