Bug 268441 - [patch] fix for building static C bindings
Summary: [patch] fix for building static C bindings
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 1.7
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 09:33 UTC by mabrand
Modified: 2011-03-19 08:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
fix for building static C bindings (687 bytes, patch)
2011-03-14 09:33 UTC, mabrand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mabrand 2011-03-14 09:33:11 UTC
Created attachment 57953 [details]
 fix for building static C bindings

Version:           1.7
OS:                All

Support for ENABLE_STATIC didn't seem to be completely implemented for the C bindings. The attached patch seems to help. Used in mingw-cross-env.

Reproducible: Didn't try
Comment 1 Lukáš Lalinský 2011-03-14 11:23:18 UTC
The reason why this wasn't done in the first place is that once you do this, you have to link the C bindings against the C+++ runtime libraries, which I thought was kind of pointless. If you think that's not a problem, I'll apply the patch.
Comment 2 mabrand 2011-03-14 11:41:10 UTC
Unless I'm misunderstanding something, it is just a general characteristic of static linking that underlying libraries have to be linked to at build-time. The fact that the underlying library is written in C++ does not seem to me to introduce any new considerations. Someone using the C bindings and static linking shouldn't be surprised by this.
Comment 3 mabrand 2011-03-14 11:42:52 UTC
By the way, I wasn't sure if this line is still necessary or what it does:

set_target_properties(tag_c PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
Comment 4 Lukáš Lalinský 2011-03-19 08:31:39 UTC
Thank you, fixed in https://github.com/taglib/taglib/commit/8f42d5b5

Yes, that line is still necessary, it tells the main TagLib library to not "dllimport" the symbols.