-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Description
Hey there, I am working on a program which both depends on libStatGen and HTSLib. When linking to both libraries I get the following errors:
/.../statgen/libStatGen.a(knetfile.o): In function `kftp_connect':
knetfile.c:(.text+0x320): multiple definition of `kftp_connect'
/.../htslib/libhts.a(knetfile.o):/.../htslib/knetfile.c:271: first defined here
/.../statgen/libStatGen.a(knetfile.o): In function `kftp_reconnect':
knetfile.c:(.text+0x530): multiple definition of `kftp_reconnect'
/.../htslib/libhts.a(knetfile.o):/.../htslib/knetfile.c:282: first defined here
/.../statgen/libStatGen.a(knetfile.o): In function `kftp_parse_url':
knetfile.c:(.text+0x760): multiple definition of `kftp_parse_url'
/.../htslib/libhts.a(knetfile.o):/.../htslib/knetfile.c:294: first defined here
/.../statgen/libStatGen.a(knetfile.o): In function `kftp_connect_file':
knetfile.c:(.text+0x8c0): multiple definition of `kftp_connect_file'
... and so on.
This is of course because both libraries have the same function names. Would it be possible to make it so both libraries can be linked without errors? As a short-term solution I simply renamed all these functions in libStatGen by adding 2 at the end. I could make a pull request, but perhaps you have other solutions in mind.
Thank you for your contributions.