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

clang error for serial_plugin.cc #12

Open
gilcel opened this issue Nov 15, 2023 · 0 comments
Open

clang error for serial_plugin.cc #12

gilcel opened this issue Nov 15, 2023 · 0 comments

Comments

@gilcel
Copy link

gilcel commented Nov 15, 2023

clang compiler gives me the following error for 'seedlink/plugins/serial_plugin/serial_plugin.cc'

error: cannot define or redeclare 'registered' here because namespace 'PluginModule' does not enclose namespace 'RegisteredModule<SeedlinkPlugin_private::Proto>'

for :

namespace PluginModule {

template<>
RegisteredModule<Proto>* RegisteredModule<Proto>::registered = NULL;

}

This works by taken out the template<> from 'namespace PluginModule{}`, like this

#ifdef __APPLE__
template<>
RegisteredModule<Proto>* RegisteredModule<Proto>::registered = NULL;
#else
namespace PluginModule {

template<>
RegisteredModule<Proto>* RegisteredModule<Proto>::registered = NULL;

}

#endif

But not sure if this is 100% correct...

@gilcel gilcel changed the title clang error for serial_plugin.cc - cannot define or redeclare 'registered' clang error for serial_plugin.cc Nov 15, 2023
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