Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbols when use as static library. #367

Open
charlietsao opened this issue Dec 8, 2023 · 0 comments
Open

Undefined symbols when use as static library. #367

charlietsao opened this issue Dec 8, 2023 · 0 comments

Comments

@charlietsao
Copy link

Platform: OSX
IDE: Version 14.3 (14E222b)

CMake Options are:

option(BUILD_RTTR_DYNAMIC "Build the dynamic/shared version of RTTR library" OFF)
option(BUILD_UNIT_TESTS "Build the unit tests of RTTR" OFF)
option(BUILD_STATIC "Build RTTR as static library" ON)
option(BUILD_WITH_STATIC_RUNTIME_LIBS "Link against the static runtime libraries" OFF)
option(BUILD_WITH_RTTI "Enable build with C++ runtime type information for compilation" OFF)
option(BUILD_BENCHMARKS "Enable this to build the benchmarks" OFF)
option(BUILD_EXAMPLES "Enable this to build the examples" OFF)
option(BUILD_DOCUMENTATION "Enable this to build the documentation" OFF)
option(BUILD_INSTALLER "Enable this to build the installer" OFF)
option(BUILD_PACKAGE "Enable this to build the installer" OFF)
option(USE_PCH "Use precompiled header files for compilation" OFF)

Build as static library then used in another project, errors are:

Undefined symbols for architecture x86_64:
  "typeinfo for rttr::detail::method_wrapper_base", referenced from:
      typeinfo for rttr::detail::method_wrapper<void (LabNode::*)(), LabNode, (rttr::access_levels)0, rttr::detail::default_invoke, rttr::detail::default_args<>, rttr::detail::parameter_infos<>, 0ul, rttr::type_list<>> in GeneralMesh.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant