Menu

#323 Release and Debug DLLs should have different names

Feature Request
closed-fixed
5
2016-05-14
2004-08-11
Anonymous
No

On windows, (unlike on Unix) it is a wise idea to have
output dlls and libs for release and debug with different
names, possibly following the Python convention:

python.exe
python_d.exe
python23.dll
python23_d.dll
etc...

The ACE library is another one:
ace.dll
aced.dll

And IBMs unicode libraries (ICU) follow a similar
converntion.

The reason for this is that applications may encounter
runtime errors when linking to libraries that use a different
heap, and release and debug versions generally do this.

Discussion

  • Karl Waclawek

    Karl Waclawek - 2006-03-09

    Logged In: YES
    user_id=290026

    I am not convinced that this is a good idea for Expat.
    Everytime I would like to debug I need to link to a
    different library. This is inconvenient.

    I am not sure that Expat will have a problem with different
    heaps, as the API does not require cross-allocation or
    cross-deallocation of memory.

     
  • Kevin J Bluck

    Kevin J Bluck - 2007-05-11

    Logged In: YES
    user_id=11142
    Originator: NO

    There are two main schools of thought on this issue. The first is that debug build targets should be named differently. The second is that debug builds should be made into a different target path than release builds.

    I personally prefer the second option, since it is completely within my own control and works regardless of whether any given library author has chosen to mangle target names. The only advantage to mangled names is that you can install and run both variants in the same folder. But then, you have to ask, what if I want to define a third build variant, such as optimized with symbols? Now I need yet another naming variant, which assuredly *no* library will support, so I'm forced into using a different path after all.

    I'd just start out building into different paths in the first place. Then you don't have to concern yourself about other people's naming conventions.

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-11

    Logged In: YES
    user_id=290026
    Originator: NO

    We are already following the different target path approach.

     
    • Bjorn L

      Bjorn L - 2016-05-03

      Old thread but as far as I can see this is still an issue when building with CMake. I can't see that you differentiate lib/bin folders for different configurations. Right now building Debug followed by Release configuration in Visual Studio will overwrite Debug output, correct me if I'm wrong.

       
  • Sebastian Pipping

    Hello Bjorn,
    to my understanding what we want is adjusted library names for debug mode on Windows and in that case only. "libexpatd" looks good to me. It would be nice to have a variable to turn that naming magic off from the outside, too. Is there a chance you could provide a patch?
    Thanks and best, Sebastian

     
    • Bjorn L

      Bjorn L - 2016-05-14

      I sent a merge request addressing the issue in this thread which I hope you received. First one so I appologize if I made some misstake.

       

      Last edit: Bjorn L 2016-05-14
  • Sebastian Pipping

    • Description has changed:

    Diff:

    
    
    • status: open --> closed-fixed
     

Log in to post a comment.