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. After Qt update, receiving lots of unusual compilation errors
Qt 6.11 is out! See what's new in the release blog

After Qt update, receiving lots of unusual compilation errors

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 623 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.
  • I Offline
    I Offline
    iyop45
    wrote on last edited by iyop45
    #1

    For example, in the following code, I get:
    "error: template argument for non-type template parameter must be an expression"

    // ...
    #include <boost/variant.hpp>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        boost::variant<int> b; // Error here
    
        return a.exec();
    }
    

    I am on Qt 5.11.0 and my codebase was compiling fine before the update. Is anyone else having this problem?

    Obviously, something as simple as this should compile fine. cpp.sh/3qyk7

    aha_1980A 1 Reply Last reply
    0
    • I iyop45

      For example, in the following code, I get:
      "error: template argument for non-type template parameter must be an expression"

      // ...
      #include <boost/variant.hpp>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          boost::variant<int> b; // Error here
      
          return a.exec();
      }
      

      I am on Qt 5.11.0 and my codebase was compiling fine before the update. Is anyone else having this problem?

      Obviously, something as simple as this should compile fine. cpp.sh/3qyk7

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      HI @iyop45,

      • can your show your project .pro file please?
      • which compiler is this?
      • which Qt version did you use before?

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      3
      • I Offline
        I Offline
        iyop45
        wrote on last edited by
        #3

        Ah. I'm sorry. There was an issue with the compiler in the kit. It must've been changed from the update?

        Thanks for raising my attention to this. I think it is working now.

        1 Reply Last reply
        1
        • aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @iyop45,

          Glad you solved it. So please mark this topic as SOLVED too. Thanks!

          Qt has to stay free or it will die.

          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