# Linker error with CXX\_MODULES

**URL:** https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449
**Category:** Development
**Tags:** os:windows, gen:ninja
**Created:** [January 9, 2026, 7:27pm UTC](https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449 "2026-01-09T19:27:20Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [January 10, 2026, 4:33am UTC](https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449/3 "2026-01-10T04:33:20Z")

</div>

Both libs are `header only` build as CXX\_MODULES

```bash
bash-5.3$ dyld_info libboost_type_index.1.90.0.dylib
libboost_type_index.1.90.0.dylib [x86_64]:
    -platform:
        platform minOS sdk
           macOS 14.0 14.0   
    -segments:
        load-offset segment section sect-size seg-size perm
        0x00000000 __TEXT 8KB r.x
        0x00001F10 __text 70
        0x00001F56 __stubs 12
        0x00001F62 __const 57
        0x00001F9C __unwind_info 96
        0x00002000 __DATA_CONST 4KB rw.
        0x00002000 __got 16
        0x00002010 __const 64
    -dependents:
        attributes load path
                       /usr/local/opt/llvm/lib/c++/libc++abi.1.dylib
                       /usr/local/opt/llvm/lib/c++/libc++.1.dylib
                       /usr/lib/libSystem.B.dylib
bash-5.3$ dyld_info libboost_any.1.90.0.dylib
libboost_any.1.90.0.dylib [x86_64]:
    -platform:
        platform minOS sdk
           macOS 14.0 14.0   
    -segments:
        load-offset segment section sect-size seg-size perm
        0x00000000 __TEXT 8KB r.x
        0x00001BD0 __text 768
        0x00001ED0 __stubs 12
        0x00001EDC __cstring 61
        0x00001F19 __const 119
        0x00001F90 __unwind_info 112
        0x00002000 __DATA_CONST 4KB rw.
        0x00002000 __got 24
        0x00002018 __const 192
    -dependents:
        attributes load path
                       /usr/local/opt/llvm/lib/c++/libc++abi.1.dylib
                       /usr/local/opt/llvm/lib/c++/libc++.1.dylib
                       @rpath/libboost_type_index.1.90.0.dylib
                       /usr/lib/libSystem.B.dylib
bash-5.3$ dyld_info libboost_a.1.90.0.dylib
libboost_any.1.90.0.dylib libboost_any.dylib libboost_atomic.1.90.0.dylib libboost_atomic.dylib         
bash-5.3$ dyld_info libboost_atomic.1.90.0.dylib
libboost_atomic.1.90.0.dylib [x86_64]:
    -platform:
        platform minOS sdk
           macOS 14.0 14.0   
    -segments:
        load-offset segment section sect-size seg-size perm
        0x00000000 __TEXT 12KB r.x
        0x00002010 __text 3370
        0x00002D3A __stubs 126
        0x00002DB8 __gcc_except_tab 284
        0x00002ED4 __unwind_info 296
        0x00003000 __DATA_CONST 4KB rw.
        0x00003000 __got 184
        0x00004000 __DATA 36KB rw.
        0x00004000 __data 32776
        0x0000C008 __bss 1
    -dependents:
        attributes load path
                       /usr/local/opt/llvm/lib/c++/libc++abi.1.dylib
                       /usr/local/opt/llvm/lib/c++/libc++.1.dylib
                       /usr/lib/libSystem.B.dylib
bash-5.3$ 

```

see too [Header-only libraries and C++20 modules](https://discourse.cmake.org/t/header-only-libraries-and-c-20-modules/10680)

and [type\_index/modules/boost\_type\_index.cppm at develop · boostorg/type\_index · GitHub](https://github.com/boostorg/type_index/blob/develop/modules/boost_type_index.cppm)

---

_[View the full topic](https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449)._
