# Multiple compiler link problems

**URL:** https://discourse.cmake.org/t/multiple-compiler-link-problems/13346
**Category:** Usage
**Tags:** os:macos, comp:gcc
**Created:** [January 7, 2025, 11:57pm UTC](https://discourse.cmake.org/t/multiple-compiler-link-problems/13346 "2025-01-07T23:57:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ramcdona](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ramcdona/32/2439_2.png) [@ramcdona](https://discourse.cmake.org/u/ramcdona)
#### Post date: [January 7, 2025, 11:57pm UTC](https://discourse.cmake.org/t/multiple-compiler-link-problems/13346/1 "2025-01-07T23:57:31Z")

</div>

For $reasons$, I need to build my project as libraries using different compilers and then link them together. I am on MacOS and am trying to blend XCode and GCC.

I’ve set up a MWE on GitHub [here](https://github.com/ramcdona/mcctp) with a longer explanation of the situation.

I think the problem is that the two compilers are using different standard libraries. This causes the linker to be unable to find desired symbols. When I try to force the same standard library, the secondary compiler (gcc) is not able to find the standard library headers.

Any help is appreciated,

Rob

---

<div class="post-metadata">

### Author: ![ramcdona](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ramcdona/32/2439_2.png) [@ramcdona](https://discourse.cmake.org/u/ramcdona)
#### Post date: [January 11, 2025, 6:57pm UTC](https://discourse.cmake.org/t/multiple-compiler-link-problems/13346/2 "2025-01-11T18:57:01Z")

</div>

This problem really boils down to the fact that GCC does not actually support libc++ in a useful way.
