/NOENTRY Link error in Managed c++ Web Service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carl

    #1

    /NOENTRY Link error in Managed c++ Web Service


    I have a managed c++ web service that uses ATL.
    Everything worked fine with VC 7.0, but when I recompile
    with VC 7.1 I get the following link warning:

    LINK : warning LNK4243: DLL containing objects compiled with /clr is not
    linked with /NOENTRY; image may not run correctly.

    Having looked in various files, I'm told to
    1) Add the /NOENTRY option,
    2) Add __DllMainCRTSta rtup@ 12 to the Force Symbol Reference
    3) Remove nochkclr.obj (which isn't there to remove).

    When I do this, ATL CStrings, and some functions don't work.

    How do I correct this for a managed web service?

    TIA.





  • William DePalo [MVP VC++ ]

    #2
    Re: /NOENTRY Link error in Managed c++ Web Service

    "Carl" <anonymous@nosp am.com> wrote in message
    news:OQTaUQifDH A.2356@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I have a managed c++ web service that uses ATL.
    > Everything worked fine with VC 7.0, but when I recompile
    > with VC 7.1 I get the following link warning:
    >
    > LINK : warning LNK4243: DLL containing objects compiled with /clr is not
    > linked with /NOENTRY; image may not run correctly.
    >
    > Having looked in various files, I'm told to
    > 1) Add the /NOENTRY option,
    > 2) Add __DllMainCRTSta rtup@ 12 to the Force Symbol Reference
    > 3) Remove nochkclr.obj (which isn't there to remove).
    >
    > When I do this, ATL CStrings, and some functions don't work.
    >
    > How do I correct this for a managed web service?[/color]

    I am not sure if one the various files is the this one:

    http://msdn.microsoft.com/library/de...omixedmode.asp

    If not, it should explain the procedure for the various cases in some
    detail. If I read it correctly, you will have to implement the usual
    DllMain() procedure which is called by _DllMainCRTStar tup() which, in turn,
    is called by the call that _you_ must make to __crt_dll_initi alize(). Be
    sure that you don't try to use the CRT until it is initialized.

    Just by the way, I don't know if my experience is typical, but when I needed
    to do this, the debugger refused to examine static variables when stopped in
    unmanaged code. It had no problem when stopped in managed code, however.

    Regards,
    Will


    Comment

    Working...