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++ / July 2004

Tip: Looking for answers? Try searching our database.

/clr option

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aldi Kraja - 04 Jul 2004 19:48 GMT
Hi,
I am starting to follow a book which is saying to use common language
runtime (clr).
So I defined a class I created as __gc type and also I included
<mscorlib.dll>
but when I build the program the VC++ is saying
c:\aldi3\cpp\helloWorld\helloWorld.cpp(7): fatal error C1190: managed
targeted code requires '#using <mscorlib.dll>' and '/clr' option

The book does not show how to define clr option. How can I control to use
clr option?
Thanks,
Aldi
William DePalo [MVP VC++] - 04 Jul 2004 20:56 GMT
> but when I build the program the VC++ is saying
> c:\aldi3\cpp\helloWorld\helloWorld.cpp(7): fatal error C1190: managed
> targeted code requires '#using <mscorlib.dll>' and '/clr' option
>
> The book does not show how to define clr option. How can I control to use
> clr option?

From the Project menu choose the <project> Properties item. Under the
Configuration Properties yellow folder in the left pane click on General.
Then on the right side find the edit box labeled "Use Managed Extensions"
make sure it is set to Yes.

Regards,
Will
Markus Palme - 04 Jul 2004 22:17 GMT
> So I defined a class I created as __gc type and also I included
> <mscorlib.dll>
[quoted text clipped - 3 lines]
> The book does not show how to define clr option. How can I control to
> use clr option?

Presuming you are using VisualStudio.NET: Open the project options,
select the "General" tab (should be visible by default) and set "Use
managed extensions" to true.

If you are compiling from the commandline you simply have to add the
"/clr" switch.

Regards
Markus

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.