# C++ with Nix in 2023, Part 2: Package Generation and Cross-Compilation

DevFeed: [C++ with Nix in 2023, Part 2: Package Generation and Cross-Compilation](<https://devfeed.tech/articles/c-with-nix-in-2023-part-2-package-generation-and-cross-compilation-32429.md>)

Original publisher: [Read original article](<https://nixcademy.com/posts/cpp-with-nix-in-2023-part-2-package/>)

Author: Jacek Galowicz

Published: 2023-11-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Nixcademy Blog](<https://devfeed.tech/sources/nixcademy-blog.md>)

Topics: [Nix](<https://devfeed.tech/topics/nix.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Cross-Compilation](<https://devfeed.tech/topics/cross-compilation.md>), [Development](<https://devfeed.tech/topics/development.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [build-system](<https://devfeed.tech/tags/build-system.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cross-compilation](<https://devfeed.tech/tags/cross-compilation.md>), [github](<https://devfeed.tech/tags/github.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

## AI overview

A tutorial on packaging C++ applications with Nix, using Nix package definitions and flakes to create reproducible builds, generate developer shells, run applications, swap compilers, and cross-compile for different platforms.

## Source excerpt

Learn to package and cross-compile C++ apps with Nix in 2023. Use nix flakes, swap compilers, and cross-compile for various platforms effortlessly.