I compiled the same program (not library) with different compilation flags, in CMake with Clang
- with CMAKE_C_FLAGS = -Wl,-export-dynamic
- with CMAKE_EXE_LINKER_FLAGS = -export-dynamic
But I noticed that the second way doesn't seem to work. I can't find the exported symbols. I'm so surprised that only the 1st way works. I don't know if the C compilers do something tricky, or Clang, or CMake. But how to let the second way work? The first way would print a lot of warnings.