# Nix Friday: C/C++ questions for next stream

**URL:** https://discourse.nixos.org/t/nix-friday-c-c-questions-for-next-stream/9692
**Category:** Events
**Created:** [October 28, 2020, 8:01pm UTC](https://discourse.nixos.org/t/nix-friday-c-c-questions-for-next-stream/9692 "2020-10-28T20:01:58Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![knedlsepp](https://discourse.nixos.org/user_avatar/discourse.nixos.org/knedlsepp/32/532_2.png) [@knedlsepp](https://discourse.nixos.org/u/knedlsepp)
#### Post date: [October 29, 2020, 9:36am UTC](https://discourse.nixos.org/t/nix-friday-c-c-questions-for-next-stream/9692/6 "2020-10-29T09:36:28Z")

</div>

I cannot really formulate the question entirely. I’d like to make better use of the clang tooling in a nix-shell environment where I build stuff using the regular gcc + GNU libstdc++ toolchain and somehow the include paths clash to produce a lot of:

`In included file: no member named 'signbit' in the global namespace; did you mean '__signbit'?clang(no_member_suggest)`

See: [clang-tools: teach about nix's include path · NixOS/nixpkgs@a10ef1a · GitHub](https://github.com/NixOS/nixpkgs/commit/a10ef1aa4fe62aa97859d24921f501183861b7b6#commitcomment-36463293)

Despite me commenting on this I have never really fully understood what is going on here and what would be a proper fix for that. I also don’t really get how closely the C++ standard includes are bound to the stdenv that I’m using. Should there be an `stdenv.cxx.cxx.lib`? Why the double `cc` in `stdenv.cc.cc.lib`? Can I mix and match standard library headers in a `nix-shell` environment using some environment variables (CPATH/…) or do I need to write my nix-expressions in a special way (`overrideCC`, etc.)?

Sorry that I’m so vague, but I guess I’d really appreciate some general insights on how the stdenv relates to it’s shipped C and C++ compiler to be able to fully understand why the above issues occurs. What is fixed after nix has built the toolchain and what is still configurable. 👏

---

_[View the full topic](https://discourse.nixos.org/t/nix-friday-c-c-questions-for-next-stream/9692)._
