You should not put -lpmemobj or other linker flags into set(CMAKE_CXX_FLAGS ...). Please use target_link_libraries instead.
We have encountered lots of undefined symbol errors during compilation. The so wrappers can't be correctly linked with libpmem, because the options are placed in wrong order.
Hello,
You should not put
-lpmemobj
or other linker flags intoset(CMAKE_CXX_FLAGS ...)
. Please usetarget_link_libraries
instead.We have encountered lots of undefined symbol errors during compilation. The
so
wrappers can't be correctly linked with libpmem, because the options are placed in wrong order.Here's the output command from
make VERBOSE=1
:Refecence: c++ - Flag '-l' in CMAKE_CXX_FLAGS doesn't work - Stack Overflow What is the right order of linker flags in gcc? - Stack Overflow