Results 1 to 2 of 2

Thread: Ignoring sys/mman.h on windows build?

  1. #1
    Join Date
    Apr 2016
    Posts
    5
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Ignoring sys/mman.h on windows build?

    I am using Qt to build application for a Xilinx board running Linux. And part of that application uses mman.h to access UIO device.

    So far I been working from Linux workstation, but I need to be able for someone else to work from windows computer (Qt with MinGW). At this moment, when I am trying to compile the project, it gives me error that sys/mman.h is not found.

    How can I make Qt ignore this error or entire class which uses this include while building application on Windows?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Ignoring sys/mman.h on windows build?

    You can use one of the platform defines to either include only on Linux or exclude on Windows.

    E.g.
    Qt Code:
    1. #ifdef Q_OS_LINUX
    2. // code only compiled on Linux
    3. #endif
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. #ifndef Q_OS_WIN
    2. // code not built on Windows.
    3. #endif
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 3rd October 2011, 23:04
  2. Can't build qwt in Windows
    By MattPhillips in forum Qwt
    Replies: 2
    Last Post: 26th December 2009, 16:18
  3. Build Qt in Windows
    By graciano in forum Installation and Deployment
    Replies: 2
    Last Post: 12th May 2009, 12:51
  4. Replies: 3
    Last Post: 28th December 2007, 11:02
  5. Replies: 10
    Last Post: 25th February 2007, 00:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.