I was noticing yesterday fltk (1.3.x) builds the "fltk" subproject
        in DLL hell mode, ie. with the compiler flag /MD (DLL runtime libs)
        instead of /MT (static runtime libs).

        Using /MD creates a situation where the resulting exe ends up
        requiring MSVCRXXX.DLL file in order to run on other machines
        that don't have VS installed.

        I'm wondering if:

                a) the /MD flag is a good default, given the DLL hell
                   it seems to incur on unsuspecting programmers;
                   perhaps /MT instead?

                b) Is there an easy way to change this for the entire lib
                   if an app programmer needs to?

        It seems for (b) the way I've found is to right click on each lib
        project (fltk, fltkimages, libpng, zlib, etc, etc) and change /MD -> /MT
        in Properties>Config Properties>C/C++>Code Generation>Runtime Lib>
        ..which is kinda a pain + easy to forget.

        Is there an easier way?

        Also, do we already have docs on the subject of building executables
        intended for release? It seems we should maybe have something for
        app programmers on how to build FLTK under win and linux so that their
        apps avoid DLL/SO hell. (Seems not so much an issue under OSX)

        If not I could probably start such a thing, as I've had a few people
        ask me this over the years via email.

        Given the various security complexities now needed to 'register'
        DLLs under windows, just dropping DLLs in the same dir as the exe
        is no longer sufficient, so "DLL hell" has only gotten worse.

        It seems for an end user to be able to just drop an .exe on their
        desktop and run it, it has to have been compiled with /MT.

        Just grepping around the ide/VisualC directory, I noticed some
        dsp files use /MT, while most uses /MD. Was kinda surprised the
        DLL projects have /MT, and all the others don't:

# grep /MT ide/VisualC6/*
ide/VisualC6/fltk_formsdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D 
"WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_formsdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od 
/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_gldll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" 
/D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_gldll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D 
"WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_imagesdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D 
"WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_imagesdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od 
/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_jpegdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" 
/D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_jpegdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od 
/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_pngdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" 
/D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_pngdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D 
"WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_zlibdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" 
/D "NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltk_zlibdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od 
/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltkdll.dsp:# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D 
"NDEBUG" /D "_WINDOWS" /YX /FD /c
ide/VisualC6/fltkdll.dsp:# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D 
"WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c

# grep /MD ide/VisualC6
[giant list too large to post!]

        Is it correct for the DLL projects to have /MT instead of /MD,
        and all the rest /MD?
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to