Help needed: fatal Error: C1190 VC++ .NET

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



Answer this question

Help needed: fatal Error: C1190 VC++ .NET

  • Cazz

    ohh...

     I am really sorry. I can't able to see that /clr option to set in solution 'project name' properties pages.

    I am trying in solution 'project name' properties pages.






  • VodooMaverick

    you simply need to set /clr - exactly what you're beeing told in the error message. when you are using managed code (and #using implies this), you need to tell the compiler to compile for managed code. thats what the /clr option does.

    WM_HOPETHISHELPS
    thomas woelfer
    http://www.die.de/blog

  • fuzzybinary

    I found it exactly where Thomas said it would be:

    Project Properties -> configuration Properties -> General -> Common Language runtime support.

    (i.e., not under C/C++).


  • M&amp;#229;ns T&amp;#229;nneryd

    Arasu,

    just take a look at the compiler options dialog. just like every other option for the compiler, /clr is also in there.

    WM_HOPETHISHELPS
    thomas woelfer
    http://www.die.de/blog

  • Equinox_d

    Hi..

       I am new for this forum. I am also facing this same error. I want to know, How we have to set that /clr option.

    This is current line.  #using <mscorlib.dll>

    How do I change to avoid that error.

    Where I have to set /clr option.


    Thanx in Advance
    Arasu



  • PatrickRR

    Project Properties -> configuration Properties -> General -> Common Language runtime support.

    WM_HOPETHISHELPS
    thomas woelfer
    http://www.die.de/blog

  • syj

    Forgive me for butting into this forum post, but for Visual Studio 2005, I just now found this feature under:

    Project Properties -> configuration Properties -> C/C++ -> General -> Compile with Common Language Runtime Support.

    While it is similar, it took me a little time to locate it since it wasn't in the exact place you had mentioned. In either case, thank you for pointing me in the right direction, Thomas.



  • CLover

    in solution explorer, rightclick on the project. select 'properties'. this will open that dialog.

    WM_HOPETHISHELPS
    thomas woelfer
    http://www.die.de/blog


  • Vanio Benetollo

    Thanx a lot woelfer,

    But I can't able to find out where Compiler option dialog is..
    I gone through google search. It is showing that, We can set /clr option for command line compiler like that.

    Can You tell me where is compiler option Dialog

    Big Smile

    Thanks
    Arasu.M

  • Deepthi_Pinapala

    Hello:

    An easy way to avoid this kind of problem is a user at initial stage when opening a project like this way

    >> In .NET environment, File/New/Project.../Visual C++/.NET/Empty Project(.NET)

    Good luck.

    october


  • Help needed: fatal Error: C1190 VC++ .NET