Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. shiboken2 binding and preprocessor flags.
Forum Updated to NodeBB v4.3 + New Features

shiboken2 binding and preprocessor flags.

Scheduled Pinned Locked Moved Unsolved Language Bindings
2 Posts 2 Posters 260 Views 2 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.
  • N Offline
    N Offline
    nitawa
    wrote on last edited by
    #1

    Hi,
    please excuse me if my question is trivial. I'm new to Shiboken and may have overlooked some crucial information. I'm currently using Shiboken2 to generate Python bindings for a C++ class. This C++ class has features that are enabled by preprocessor flags.
    Can preprocessor flags be passed to Shiboken2 (Qt 5)? If not, is there an effective workaround for this situation?

    Thanks for your valuable feedback.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I don't have shiboken2 at hand but if the options are the same as shiboken6, you can use: --clang-option="-D MY_DEFINE" and that should do the trick.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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