-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple definition errors #13
Comments
The appropriate fix for this and other naming conflicts is to wrap all of libStatGen in a namespace. This would be a breaking change but could be set up to be enabled with a preprocessor definition. |
I support the idea of wrapping libStatGen in a namespace. It fixes conflicts and makes your code clearer to read, especially if you are using many different libraries. However, in my case the naming conflicts originate from a C file and C doesn't support namespace resolution. |
Just curious, is it possible to use libStatGen alone? |
Not always, there are some differences. The API is quite different, and in my opinion much clearer in libStatGen. But it is also missing some functionality, for example I don't see any support for BCF or CRAM. |
You are correct, libStatGen does not support BCF or CRAM. It is a goal to someday support them (probably by incorporating htslib to handle those - ideally wrapping to maintain the libStatGen API). |
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:
... 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.
The text was updated successfully, but these errors were encountered: