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. <future> is not supported when compiling with /clr or /clr:pure

<future> is not supported when compiling with /clr or /clr:pure

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 2.8k 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.
  • K Offline
    K Offline
    Kseny
    wrote on last edited by
    #1

    Hello.
    I’m trying to use in my Qt project some C# dll, like in this guide:
    http://pragmateek.com/using-c-from-native-c-with-the-help-of-ccli-v2/ .
    I have no problems with native C++ application. But when I’m trying do the same in test Qt console application I have this compilation error:
    error C1190: managed targeted code requires a '/clr' option.
    Ok, for test Qt project I can add this option and it work correctly. But when compile my own application with /clr option I have one more compilation error:
    error C1189: <future> is not supported when compiling with /clr or /clr:pure.
    Why does Qt application requires /clr option and simple C++ app doesn’t? Can I overcome this requirement some way?

    K 1 Reply Last reply
    0
    • K Kseny

      Hello.
      I’m trying to use in my Qt project some C# dll, like in this guide:
      http://pragmateek.com/using-c-from-native-c-with-the-help-of-ccli-v2/ .
      I have no problems with native C++ application. But when I’m trying do the same in test Qt console application I have this compilation error:
      error C1190: managed targeted code requires a '/clr' option.
      Ok, for test Qt project I can add this option and it work correctly. But when compile my own application with /clr option I have one more compilation error:
      error C1189: <future> is not supported when compiling with /clr or /clr:pure.
      Why does Qt application requires /clr option and simple C++ app doesn’t? Can I overcome this requirement some way?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @kseny

      Hi and welcome to devnet forum

      You need to show the source code and the exact line for the compiler complaint. Otherwise any advice is based on crystal ball reading.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by VRonin
        #3

        Are you using qmake, cmake or visual studio? (spoiler, you can in the latter, not in the former 2)

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kseny
          wrote on last edited by
          #4

          I'm trying with qmake and Visual Studio with same result.

          1 Reply Last reply
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            In visual studio you can set single .cpp files to be compiled with /clr rather than the entire project. This allows you to avoid conflicts.
            Any cpp file that #includes directly or indirectly <QThread> need to be compiled without the clr flag

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            J 1 Reply Last reply
            5
            • VRoninV VRonin

              In visual studio you can set single .cpp files to be compiled with /clr rather than the entire project. This allows you to avoid conflicts.
              Any cpp file that #includes directly or indirectly <QThread> need to be compiled without the clr flag

              J Offline
              J Offline
              JANG SOONMYUN
              wrote on last edited by
              #6
              This post is deleted!
              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