By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,786 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,786 IT Pros & Developers. It's quick & easy.

fatal error C1190 in VC++ .NET

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
<ka*******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
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

Nov 17 '05 #2

P: n/a
<ka*******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
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

Nov 17 '05 #3

P: n/a
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

Nov 17 '05 #4

P: n/a
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

Nov 17 '05 #5

P: n/a
<ka*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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
Nov 17 '05 #6

P: n/a
<ka*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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
Nov 17 '05 #7

P: n/a
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

Nov 17 '05 #8

P: n/a
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

Nov 17 '05 #9

P: n/a
<ka*******@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
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

Nov 17 '05 #10

P: n/a
<ka*******@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
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

Nov 17 '05 #11

P: n/a
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

Nov 17 '05 #12

P: n/a
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

Nov 17 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.