NeoRL icon indicating copy to clipboard operation
NeoRL copied to clipboard

Error: multiple definition cl::operator| ...

Open StasiaS opened this issue 9 years ago • 4 comments

Help me please,

When I do "make", I get next errors

CMakeFiles/NeoRL.dir/source/neo/PredictiveHierarchy.cpp.o: In function cl::operator|(cl::QueueProperties, cl::QueueProperties)': PredictiveHierarchy.cpp:(.text+0xf8): multiple definition ofcl::operator|(cl::QueueProperties, cl::QueueProperties)' CMakeFiles/NeoRL.dir/source/neo/Swarm.cpp.o:Swarm.cpp:(.text+0xf8): first defined here

I have got 24 of these errors with each file *.cpp from NeoRL and in each from his write about Swarm.cpp

How can I this fix?

StasiaS avatar Jan 22 '16 08:01 StasiaS

Sorry, I didn't see this until now! The fix is to inline these functions (cl::operator| in cl2.hpp). It's a bug in cl2.hpp I think, but it should work when inlined.

222464 avatar Jan 26 '16 20:01 222464

Thank you. I updated this, but now I have got next errors: /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function _start': (.text+0x18): undefined reference tomain' collect2: error: ld returned 1 exit status make[2]: *** [NeoRL] Ошибка 1 make[2]: Выход из каталога /home/anastasia/NeoRL-0.5.0/NeoRL/build' make[1]: *** [CMakeFiles/NeoRL.dir/all] Ошибка 2 make[1]: Выход из каталога/home/anastasia/NeoRL-0.5.0/NeoRL/build' make: *** [all] Ошибка 2

StasiaS avatar Jan 27 '16 08:01 StasiaS

Are you using the AMD APP SDK or the Intel SDK? Try using the AMD APP SDK, it works also on Intel processors as well as AMD GPUs.

222464 avatar Jan 27 '16 13:01 222464

When I use AMD SDK, then I get version OpenCL version 1.1. without inline, and get previous errors. I use nexy variant https://github.com/KhronosGroup/OpenCL-ICD-Loader Or I don't right understand you? Then look other my issue, please.

StasiaS avatar Jan 27 '16 14:01 StasiaS