VS2008 b2: "error C2813: #import is not supported with /MP"

  • Thread starter Thread starter Nikolay Belyh
  • Start date Start date
N

Nikolay Belyh

Why?
I mean, why #import is not supported with /MP?
Or how do I get round this? Beside from removing /MP, of course =)

Kind regards, Nikolay
 
Nikolay said:
Why?
I mean, why #import is not supported with /MP?

Who knows.
Or how do I get round this? Beside from removing /MP, of course =)

One approach is to use a separate project to process the #import
statement(s) and then just #include the .tlh file in your /MP project
directly. Make the /MP project depend on the #import project, and the
soltuion build should "just work".

-cd
 
Why?
Who knows.

Actually, when I encounted this, my first thought not "why" but rather
"WTF" :-)
Just wondering, why did they impose such a restriction?! AFAIR, quite
a large number of projects use #import..
It seems there shouldn't be unmanageable difficulties, since
incredibuild (for example)
does not have problems with #import...
One approach is to use a separate project to process the #import
statement(s) and then just #include the .tlh file in your /MP project
directly. Make the /MP project depend on the #import project, and the
soltuion build should "just work".

Thanks a lot.
But this rises a question about the location the generated TLH/TLI
files..
I mean, it seems that normally they are generated to the "intermediate
directory".. are they?
This means that "import project" might need some special
configuration..

And what is the other approach? (you said "one approach is.."?)

Kind regards, Nikolay.
 
Nikolay said:
Actually, when I encounted this, my first thought not "why" but rather
"WTF" :-)
Just wondering, why did they impose such a restriction?! AFAIR, quite
a large number of projects use #import..
It seems there shouldn't be unmanageable difficulties, since
incredibuild (for example)
does not have problems with #import...

I suspect it's due to resource limitations that /MP + #import together isn't
supported. In VS2005, /MP isn't even officially supported, but it's there.
Thanks a lot.
But this rises a question about the location the generated TLH/TLI
files..
I mean, it seems that normally they are generated to the "intermediate
directory".. are they?
This means that "import project" might need some special
configuration..

Yes, probably. Or maybe a custom build step that copies the generated files
to a known location.
And what is the other approach? (you said "one approach is.."?)

Don't use /MP :) I'm sure there are other variations possible as well.

-cd
 
Back
Top