CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Disabling CLI and Managed C++

    Our company is looking at upgrading to VS 2008 from VS 6.0. Almost all of the work we do is for non-Intel embedded processors. Out biggest concern is ensuring that our developers don't accidentally include any form of Managed C++ or C++/CLI in our target code.

    Is there a compiler switch or MACRO that will disable Managed C++ or C++/CLI and cause an error to be generated if a developer tries to use Managed C++ or C++/CLI?

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Disabling CLI and Managed C++

    Well C++ CLI is a seperate syntax.

    Whats to stop someone from pasting some PASCAL into their C++ project?

    Common sense mostly.

    Managed C++ is similar, except there are standard ways to make code managed and unmanaged. Compiler switches, and garbage collector macros.

    There is no substitute for experience and knowledge, but there probably would be some proprietary macros you can develop if you really wanted to. Mostly I suggest code reviews and disabling copy paste for new employees.
    Last edited by ahoodin; September 27th, 2007 at 02:54 PM.
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: Disabling CLI and Managed C++

    Thanks for the information. I've never even looked at C++/CLI so I didn't know the syntax was significantly different.

    We do code reviews and monitor our interns closely but it would save time (and hence money) if the compiler generated errors whenever Managed code was used.

    Would you happen to know where I can get list of the compiler switches used to disable managed code and garbage collectors?

  4. #4
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Disabling CLI and Managed C++

    ahoodin
    To keep the plot moving, that's why.

  5. #5
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: Disabling CLI and Managed C++

    Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured