vs2005 and the C runtime library

Hello,
I've got VS2005 and I'm producing a standard C application, not using .NET/clr or MFC, ATL, etc.

I wish to simply produce an executable without any manifest or reliance on any files other than the executable itself and the C runtime.

Do I need to set 'Allow Isolation' to No (/ALLOWISOLATION:NO) in the Linker/manifest configuration section and in the Manifest Tool/Input and Output set 'Embed Manifest' to No (this changes the flags to /out:.\debug\test.exe.embed.manifest /notify_update) or can I get away with just one setting (or something else).

I want to create a make file but don't know what settings to use. Is all this manifest stuff really necessary for bog-standard console/windows apps When I used VS2003 there was none of it.

Thanks.

Neil.



Answer this question

vs2005 and the C runtime library

  • Pomelo

    If you use the shared CRT, then you need a manifest!!! There is no way around it in VC2005!

    See: Using the VC 2005 shared CRT/MFC (DLL) without a manifest is not supported!
    http://blog.kalmbachnet.de/ postid=54

    Greetings
      Jochen

  • Lina79

    Neil,

    I have faced the same problem and It seems /MD is the problem causing option here. If you replace it with /MT the error disappeared.

    Thanks,

    Vasudeva.


  • pippyn

    Thanks. Now I know! I searched high and low for something vaguely as informative as this on MSDN site but found nothing.

    Neil.


  • Ed.S.

    <neil walker@discussions.microsoft.com> wrote in message
    news:44138211-492e-415c-82bd-5bb99aa4e213@discussions.microsoft.com
    > I've got VS2005 and I'm producing a standard C application, not using
    > .NET/clr or MFC, ATL, etc.
    >
    > I wish to simply produce an executable without any manifest or
    > reliance on any files other than the executable itself and the C
    > runtime.
    >
    > Do I need to set 'Allow Isolation' to No (/ALLOWISOLATION:NO) in the
    > Linker/manifest configuration section and in the Manifest Tool/Input
    > and Output set 'Embed Manifest' to No (this changes the flags to
    > /out:.\debug\test.exe.embed.manifest /notify_update) or can I get
    > away with just one setting (or something else).   
     
    Manifests are mostly irrelevant in your case. You can turn it off by setting Linker | Manifest file | Generate Manifest = No
     
    In project settings, go to C/C++ | Code Generation | Runtime Library and make sure you don't have a choice with "DLL" in it. Set to Multi-threaded in release configuration, Multi-threaded Debug in debug configuration.
     
    Also on General page, make sure you have
     
    Use of MFC = Use Standard Windows libraries
    Use of ATL = Not Using ATL
    Common Language Runtime support = No Common Language Runtime support
     
    These options will produce a self-contained executable with no dependencies (beyond standard OS libraries).
    --
    With best wishes,
        Igor Tandetnik

  • Mr.V.

    Hello,

    All my settings were as you described except 'generate manifest'. However, I need to compile with /MD to keep the size down and to work with other libraries I'm compiling with.

    When I change 'generate manifest' to NO and try to run the executable (even on this same machine I'm compiling with) the executable generates an error: 'R6034 the application has made an attempt to load the C runtime library incorrectly'.

    I'm not bothered about having to ensure msvcr80.dll is present, I just don't want to have to lug around manifest files for every executable. How do I achieve this

    <rant>Why did the MS C++ team have to make this so convoluted, complicated and backwards incompatible All I want to do is make a simple exe but all this managed stuff and manifests and god knows what else is making me go back to VS2003! The whole point of a C compiler is you can create a standalone application.</rant>

    Thanks.

    Neil.


  • vs2005 and the C runtime library