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 / .NET Framework / .NET SDK / December 2005

Tip: Looking for answers? Try searching our database.

vcclr.h broken in .NET SDK

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hugh - 14 Dec 2005 18:59 GMT
I have a project that #include's <vcclr.h>. I'm having a problem building it
with the SDK.

Follow me now...

1. We don't install VS.NET or VC.NET on our build servers - just the .NET
and Platform SDKs.
2. When my project brings in <vcclr.h>, it brings in <gcroot.h>, which
brings in <msclr\gcroot.h>.
3. The .NET SDK installs <vcclr.h> and <gcroot.h>. It does not install
<msclr\gcroot.h>, however.
4. My build fails because it can't find the required <msclr\gcroot.h> header
file.

The VS.NET and VC.NET installations install everything, so the developer
workstations are building the project just fine, but our continuous builds
are failing.

Why does the SDK install files that cannot be used? or is there a way to get
the SDK to lay down all the files it needs?
Willy Denoyette [MVP] - 14 Dec 2005 21:51 GMT
>I have a project that #include's <vcclr.h>. I'm having a problem building
>it with the SDK.
[quoted text clipped - 16 lines]
> Why does the SDK install files that cannot be used? or is there a way to
> get the SDK to lay down all the files it needs?

As far as I know, the .NET SDK do not include gcroot.h nor vcclr.h (at least
they should not), these are VS headers only VC++ should install them under
....\VC\include\msclr.

Willy.
Hugh - 15 Dec 2005 14:34 GMT
Actually, they do get installed.

I ran the SDK setup with the defaults and those headers got installed to
\Program Files\Microsoft Visual Studio 8\VC\include.

>>I have a project that #include's <vcclr.h>. I'm having a problem building
>>it with the SDK.
[quoted text clipped - 22 lines]
>
> Willy.
Hugh - 15 Dec 2005 14:39 GMT
To clarify... vcclr.h and gcroot.h are installed in \Program Files\Microsoft
Visual Studio 8\VC\include. <msclr\gcroot.h> is not installed.
Willy Denoyette [MVP] - 15 Dec 2005 19:57 GMT
> To clarify... vcclr.h and gcroot.h are installed in \Program
> Files\Microsoft Visual Studio 8\VC\include. <msclr\gcroot.h> is not
> installed.

True, but gcroot.h is a "forwarder" header, used for backwards
compatibility. The actual implementation is in msclr\gcroot.h. New
applications should include mscl\gcroot.h instead of gcroot.h.

Willy.
Hugh - 15 Dec 2005 21:03 GMT
OK, but *I'm* not including <gcroot.h>. <vcclr.h> is the one including it.

I'm including <vcclr.h> so I can use PtrToStringChars. I figured, "the SDK
gives me vcclr.h, so I'm set."

Apparently I was wrong. But I don't think I should have been.

>> To clarify... vcclr.h and gcroot.h are installed in \Program
>> Files\Microsoft Visual Studio 8\VC\include. <msclr\gcroot.h> is not
[quoted text clipped - 5 lines]
>
> Willy.
Willy Denoyette [MVP] - 15 Dec 2005 22:40 GMT
Unfortunately, vcclr.h includes gcroot.h which at his turn includes
msclr\gcroot, if you don't need msclr\gcroot.h you could remove the #include
gcroot.h from vcclr.h, or move the PtrToStringChars to a private header.
IMO this is wrong, I would suggest you to file an issue to the product
feedback at http://lab.msdn.microsoft.com/productfeedback/.

Willy.

> OK, but *I'm* not including <gcroot.h>. <vcclr.h> is the one including it.
>
[quoted text clipped - 12 lines]
>>
>> Willy.
Hugh - 16 Dec 2005 01:42 GMT
Cool. I ended up copying the inlined PtrToStringChars function to a private
header, but ick... code smell.

Thanks for the suggestion. I'll do that.

> Unfortunately, vcclr.h includes gcroot.h which at his turn includes
> msclr\gcroot, if you don't need msclr\gcroot.h you could remove the
[quoted text clipped - 22 lines]
>>>
>>> Willy.

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.