open62541 / open62541-nodeset-loader

Library for loading opc ua nodesets from xml and sorting the nodes
Mozilla Public License 2.0
27 stars 23 forks source link

ERROR building using CMake #260

Closed r1gbymordeca1 closed 6 months ago

r1gbymordeca1 commented 6 months ago
[ 80%] Linking C executable parserDemo
/usr/bin/ld: ua_server.c.o (symbol from plugin): in function `cmpServerComponent':
(.text+0x0): multiple definition of `addNamespace'; CMakeFiles/parserDemo.dir/dump.c.o:dump.c:(.text+0xcc): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [backends/stdout/examples/CMakeFiles/parserDemo.dir/build.make:116: backends/stdout/examples/parserDemo] Error 1
make[1]: *** [CMakeFiles/Makefile2:193: backends/stdout/examples/CMakeFiles/parserDemo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

It fails exactly at 80% due to the example file, could you please help in this regard?

xydan83 commented 6 months ago

Hi! Have you tried disabling examples in CMAKE?

SET(ENABLE_EXAMPLES OFF)

Or use ccmake to disable this option.

r1gbymordeca1 commented 6 months ago

Yes, that worked! Thank you! It was very silly I hadn't changed it in my ccmake configuration.