Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nikolay Belyh - 22 Sep 2007 11:57 GMT
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
Carl Daniel [VC++ MVP] - 22 Sep 2007 15:44 GMT
> 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
Nikolay Belyh - 22 Sep 2007 18:23 GMT
> > 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.
Carl Daniel [VC++ MVP] - 22 Sep 2007 20:16 GMT
>>> Why?
>
[quoted text clipped - 7 lines]
> 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.

>> 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
[quoted text clipped - 8 lines]
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.