Duplicate symbol for new / delete since pulling latest changes
jamiebullock opened this issue · 1 comments
jamiebullock commented
Hi...
Since pulling the latest version of Flext master into my project, I am getting link errors:
duplicate symbol 'operator delete[](void*)' in:
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_base.o
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_regression.o
duplicate symbol 'operator new(unsigned long)' in:
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_base.o
/Volumes/Storage/jamie/Library/Developer/Xcode/DerivedData/ml-cegbtphjlzgqndapbzubbuwhzqli/Build/Intermediates.noindex/ml.build/Development/ml.knn pd.build/Objects-normal/x86_64/ml_regression.o
etc
I am defining FLEXT_USE_CMEM
which used to fix this (I think).
I am also using FLEXT_INLINE
and FLEXT_USESIMD
Any ideas?
i-n-g-o commented
Hello.
I ran into the same problem.
The duplicated symbols come from the global operators overwritten in flsupport.cpp.
It happened for me when i tried to compile a library with several externals - each defining the global operators (new, delete, new[], delete[] in my case).
It seems to me that those global operators are not needed, so i deleted them. It links fine, the externals work as expected.