Skip to content

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

@toBeOfUse

Description

@toBeOfUse

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.

)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions