fatal error C1190 in VC++ .NET

K

karthik.t

Hello,


I am gettin a fatal error C1190 when I try to compile the code and run
it. Could anyone provide a solution for that? I guess I need to set the
/clr switch.


Here is the error:

fatal error C1190: managed targeted code requires '#using
<mscorlib.dll>' and '/clr' option

It points to the syntax on code:

#using <mscorlib.dll>

<Yeah the third line of my code!!!!> ;-)

Would appreciate if anyone cud provide a solution for this! :) Thanks
a much!

Karthik
 
W

William DePalo [MVP VC++]

it. Could anyone provide a solution for that? I guess I need to set the
/clr switch.
Yes.

fatal error C1190: managed targeted code requires '#using
<mscorlib.dll>' and '/clr' option

From the menu, navigate to this setting

Project->Properties->Configuration Properties->General->Use Managed
Extension

and set it to "yes"

Regards.
Will
 
K

karthik.t

Thnx a much Will!!! Solved it in a jiffy!

But now.. the problems extends to "RTC and clr incompatible"
issue...:((....

Error D2016: '/RTC1' and '/clr' command-line options are incompatible

Any thoughts on that?

Thnx again!

Cheers!
Karthik
 
W

William DePalo [MVP VC++]

Thnx a much Will!!!

You are welcome.
Solved it in a jiffy!

I try not to give bogus advice. :)
But now.. the problems extends to "RTC and clr incompatible"
issue...:((....

Error D2016: '/RTC1' and '/clr' command-line options are incompatible

Any thoughts on that?

Yup. Navigate to

Project->Properties->C++->Code Generation->Basic Runtime Checks

and choose a setting that works. :)

If, like me, you don't have strong feelings about how the compiler generates
the code and the runtime checks, then just choose the correct project type
from the start. That is if you tell the IDE that you are building a managed
application then you wouldn't normally have to tweak the settings.

Will
 
K

karthik.t

Will! thnx again! :)

I tried all the settings.. but dunno why I am getting the following
error..

Command line error D2016 : '/YXStdAfx.h' and '/clr' command-line
options are incompatible

Again... Any thoughts???

Thnx for taking the trouble! :)

Karthik
 
W

William DePalo [MVP VC++]

Will! thnx again! :)

You are welcome, still. :)
I tried all the settings.. but dunno why I am getting the following
error..

Command line error D2016 : '/YXStdAfx.h' and '/clr' command-line
options are incompatible

Again... Any thoughts???

This is a different error. The IDE is complaining about the pre-compiled
header settings. You can either turn off the header pre-compilation option
or, better yet IMO, start a new .Net project so that the default IDE
settings will be compatible with your project.

Regards,
Will
 
K

karthik.t

gr8!! I'll try that and see if it compiles...:)... probably get back
later today!

Happy 4th of July if you are in the territory of Uncle Sam!!

Cheers!
Karthik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

/clr option 2
Managed code within unmanaged code ? 3
mscorlib.dll 3
newbie help ?? -> mscorlib.dll 2
UrlDecode in C++? 5
fatal error question 1
CStrings and managed Code 1
Detecting mscorlib.dll? 6

Top