Results 1 to 7 of 7

Thread: Hiding boost headers from MOC, but still error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    254
    Thanks
    92
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Hiding boost headers from MOC, but still error

    I've made fresh install of Qt 5.1.0 on Windows 7. I'm trying to compile my project which is using boost library interprocess communication. Since it was giving compilation error earlier, I've made the moc not to detect boost headers by adding #ifndef Q_MOC_RUN & #endif between the boost headers. It worked fine then.

    Now had to change my PC, installed fresh copy of Windows 7, then installed Qt 5.1.0 MSVC 2010. After building the project the same error which used occur earlier for not adding #ifndef Q_MOC_RUN surfaced again. But now I'm adding that around boost headers.

    Qt Code:
    1. D:\boost_1_53_0\boost\mpl\if.hpp:131: error: Macro argument mismatch.
    To copy to clipboard, switch view to plain text mode 

    And on clicking the reported issue - the code it pointed is
    Qt Code:
    1. // if.hpp
    2. struct if_
    3. {
    4. enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value };
    5.  
    6. typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) >
    7. ::template result_<T1,T2>::type type;
    8.  
    9. BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2))
    10. };
    11.  
    12. #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
    13.  
    14. BOOST_MPL_AUX_NA_SPEC(3, if_) // <<------------------- Here
    15.  
    16. }}
    To copy to clipboard, switch view to plain text mode 

    Someone please help me. It's affecting my tight schedule by not allowing me to proceed further.
    And my project settings looks like as shown in the attached pic.

    settings.jpg

    Thank you.
    Last edited by rawfool; 11th July 2013 at 15:56.

Similar Threads

  1. Boost: use it with Qt
    By Handi in forum Installation and Deployment
    Replies: 12
    Last Post: 2nd April 2012, 00:16
  2. QT/C++/ BOOST questions
    By joebats72 in forum Newbie
    Replies: 4
    Last Post: 17th January 2011, 22:49
  3. Qt and Boost in the same C++ program?
    By TriKri in forum Qt Programming
    Replies: 12
    Last Post: 9th May 2010, 22:58
  4. Boost libraries
    By steg90 in forum General Programming
    Replies: 26
    Last Post: 13th June 2007, 12:50
  5. Error compiling Qt3 app with Boost signals support
    By stodge in forum Qt Programming
    Replies: 3
    Last Post: 3rd May 2007, 10:48

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.