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

multiple definition errors #8

Open
omerbrandis opened this issue Nov 24, 2021 · 0 comments
Open

multiple definition errors #8

omerbrandis opened this issue Nov 24, 2021 · 0 comments

Comments

@omerbrandis
Copy link

omerbrandis commented Nov 24, 2021

hi,

I'm having some problem using the lib on linux ubuntu.
I've built a very simple CMakelists.txt that simply compiles the cpp files in the src folder.

then , in another project ( also ubuntu & cmake, cpp 17 )
included the headers & objects and wrote some very simple code

#include "ColorSpace.h"
ColorSpace::Rgb TempRGB;

the build failed with
ColorSpace.cpp: -1: error: multiple definition of `ColorSpace::Rgb::Rgb()'
which is somewhat surprising since I see that the file has include guards.

should I have addressed
typeinfo.h:

#ifndef __GXX_MERGED_TYPEINFO_NAMES
// By default, typeinfo names are not merged.
#define __GXX_MERGED_TYPEINFO_NAMES 0
#endif

// By default follow the old inline rules to avoid ABI changes.
#ifndef __GXX_TYPEINFO_EQUALITY_INLINE
  #if !__GXX_WEAK__
    #define __GXX_TYPEINFO_EQUALITY_INLINE 0
  #else
    #define __GXX_TYPEINFO_EQUALITY_INLINE 1
  #endif
#endif

?

thanks,
Omer.

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