Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. One the way to precompiled header
Forum Updated to NodeBB v4.3 + New Features

One the way to precompiled header

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 354 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by
    #1

    Be cause the MSVC compiling is very very slow, I try to integrate pchs.

    Here my pro-file

    CONFIG += precompile_header
    PRECOMPILED_HEADER = stable.h
    HEADERS += stable.h

    Here is my stable.h

    #ifndef MYPCH
    #define MYPCH
    #include <compilersettings.h>
    #include <qtgeneral.h>
    #endif // MYPCH

    Now I, have a problem with compiler warnings. I have had disabled it in a header file compilersettings.h

    // ************** unused parameter
    #pragma warning(disable: 4100)
    // ************** local variable initialized but unused
    #pragma warning(disable: 4189)

    This work without pchs fine but not with pchs. I get some hounded of warnings now.

    I tried it to set compiler flags
    QMAKE_CXXFLAGS += /wd4100
    QMAKE_CXXFLAGS += /wd4189
    but that has no effect.

    So my questions are, how to set the MSVC compiler flags correct and why works my compilersettings.h not with pchs?

    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