Skip to content
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

Class name "srcSAXController" prevents static linking with libsrcml #4

Open
toBeOfUse opened this issue Feb 18, 2024 · 0 comments
Open
Assignees

Comments

@toBeOfUse
Copy link

toBeOfUse commented Feb 18, 2024

Since libsrcml and srcSAX both have a class named srcSAXController, they can't both be used in one executable with static linkage. (I see this problem when trying to use them both on Windows, but I think it would actually happen on Linux as well, since both platforms use archives of object files for their static libraries.) A solution would be to put put this library's code in a namespace, to reduce the number of global names it adds and prevent collisions.

(In general, srcSAX's contents should probably be namespaced to prevent these issues. Google's C++ style guide says:

With few exceptions, place code in a namespace... Namespaces wrap the entire source file after includes, gflags, definitions/declarations and forward declarations of classes from other namespaces.

)

@toBeOfUse toBeOfUse self-assigned this Feb 18, 2024
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

No branches or pull requests

1 participant