It seems the PR #3421 change target_link_libraries(common_foo_library PUBLIC opentelemetry_api) to target_link_libraries(common_foo_library PRIVATE opentelemetry-cpp::api), but the dependency should be PUBLIC because the compile definitions on opentelemtry-cpp::api target (like OPENTELEMETRY_STL_VERSION) should be propagated from API to the final executable target which configures the SDK, or the API header file will be inconsistent in the executable and the common library.
It seems the PR #3421 change
target_link_libraries(common_foo_library PUBLIC opentelemetry_api)totarget_link_libraries(common_foo_library PRIVATE opentelemetry-cpp::api), but the dependency should be PUBLIC because the compile definitions onopentelemtry-cpp::apitarget (likeOPENTELEMETRY_STL_VERSION) should be propagated from API to the final executable target which configures the SDK, or the API header file will be inconsistent in the executable and the common library.