+
Skip to content

Conversation

jmarshall
Copy link
Contributor

Some people's programs use both HTSlib and libbwa.a — see e.g. samtools/htslib#693. Unfortunately one function — ksprintf — is defined in both libraries, leading to linker errors.

This happens for ksprintf only, because all the other functions in bwa's kstring.h are declared as static inline.

This PR makes ksprintf() static inline in kstring.h, so that it (like the other bwa/kstring.h functions) won't conflict with similar HTSlib functions. Instead implement it and a new kvsprintf() in terms of a new bwa_kvsprintf() function. Fixes samtools/htslib#693.

Make ksprintf() static inline in kstring.h, so that it (like the other
bwa/kstring.h functions) won't conflict with similar HTSlib functions.
Instead implement it and kvsprintf() in terms of a new bwa_kvsprintf()
function. Fixes samtools/htslib#693.
@lh3 lh3 merged commit 4d2eb1f into lh3:master Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate symbols with libbwa

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载