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

Duplicate symbol for new / delete since pulling latest changes #45

Open
jamiebullock opened this issue May 15, 2021 · 1 comment
Open

Comments

@jamiebullock
Copy link
Contributor

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
Copy link

i-n-g-o commented Jan 2, 2022

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.

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

2 participants