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. Resolving Qt <-> glew conflicts when using pch

Resolving Qt <-> glew conflicts when using pch

Scheduled Pinned Locked Moved General and Desktop
pch
1 Posts 1 Posters 557 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.
  • J Offline
    J Offline
    Justin Sayne
    wrote on last edited by
    #1

    Hi,

    I'm trying to incorporate precompiled headers into my project and am running into the problem of using Qt with glew. I.e. if I try to include <QtWidgets> inside my pch.h it will also include gl.h with QtOGL and throw errors when including glew in one of my files because gl.h has been included before.

    If I then try to include glew.h before any Qt includes in my pch, then Qt undefines all glew macros in qopenglfunctions.h and I'll get undefined symbol errors.

    Is there any way to get around this without disabling pch usage for all files that include glew.h?

    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