Re: Debug/release libs

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have following problem. I created a static libruary (mylib.lib).

I compiled it with Multithreaded DLL runtime in release mode. Now I want
to give out this library. But users who use it should be able to debug
their programs (i.e. compile their programs in debug mode Multithreaded
DLL DEBUG runtime ).

But at link time following warning is shown and prog crashes. Do I have to
give out both debug and release?

Thanks a lot,

Boni

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library


If your program allocates memory that is deleted by the user application,
then yes.
This memory allocation can also happen through use of stl parameters and
things like that.

In that case you need to supply 2 libraries to save your users form having
to jump through hoops.
still, in that case you still have the problem that your users need to use
the same compiler version that you used for building the library.

--

Kind regards,
Bruno.
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"


.



Relevant Pages

  • Debug/release libs
    ... I compiled it with Multithreaded DLL runtime in release mode. ... programs (i.e. compile their programs in debug mode Multithreaded DLL DEBUG ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Debug/release libs
    ... I compiled it with Multithreaded DLL runtime in release mode. ... debug their programs (i.e. compile their programs in debug mode ... you can compile your code with /Zl to omit the default ...
    (microsoft.public.dotnet.languages.vc)
  • Why would release static lib be significantly larger then my debug build?
    ... When I compile and link, I noticed that my debug lib is 2668K and the release build is over 16K. ... Release is using /MD and Debug /MDD for runtime libraries. ...
    (microsoft.public.vc.language)
  • Re: Carrying Libraries on Your Back...
    ... > Why not build on an installed based of assemblies, ... > than porting libraries around, ... download source code ... compile local source against header files ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Debug Vs Release
    ... > If I compile that code in debug mode then dissassemble the EXE, ... > private static void Main(stringargs) ...
    (microsoft.public.dotnet.framework.aspnet)