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. Error: C2813: #import is not supported with /MP when compiling a Qt project.
QtWS25 Last Chance

Error: C2813: #import is not supported with /MP when compiling a Qt project.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 3.2k 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.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    Hi,
    I am trying to compile my project with #import directives such as

    @
    .....
    #import "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\MSO.DLL"
    rename("RGB", "MSORGB")
    rename("DocumentProperties", "MSODocumentProperties")
    #import "C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB"
    .....

    @

    but bumping my head against the C2813: #import is not supported with /MP error.From http://msdn.microsoft.com/en-us/library/bb385193(v=vs.100).aspx I saw that the /MP flag only controls the number of processes the compiler uses to speed up the build process so I commented out the flag
    @

    QMAKE_CXXFLAGS += /MP

    @

    and thought the code would build as usual.It would just take longer .But the compiler them complains about syntax errors that are not there when the flag is not commented out.I know msdn proposes a workaround

    • Move all the #import directives in your various source files to one or more files, and then compile those files without the /MP option. The result is a set of generated header files.

    • In your remaining source files, insert #include directives that specify the generated headers, and then compile your remaining source files by using the /MP option. 
      

    and I am trying that tomorrow but don't understand how the non existent errors are introduced.I was wondering if there was a way to not use the /MP flag and have my code to compile.

    Thank you for your time.

    Why join the navy if you can be a pirate?-Steve Jobs

    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