blob: 45b4c74aa5a4d8100b73c0aaec0e0d1e583fe9e6 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en" data-content_root="" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Developing on Windows &#8212; Apache Arrow v17.0.0.dev77</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
</script>
<!-- Loaded before other Sphinx assets -->
<link href="../../_static/styles/theme.css?digest=8d27b9dea8ad943066ae" rel="stylesheet" />
<link href="../../_static/styles/bootstrap.css?digest=8d27b9dea8ad943066ae" rel="stylesheet" />
<link href="../../_static/styles/pydata-sphinx-theme.css?digest=8d27b9dea8ad943066ae" rel="stylesheet" />
<link href="../../_static/vendor/fontawesome/6.5.1/css/all.min.css?digest=8d27b9dea8ad943066ae" rel="stylesheet" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.5.1/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.5.1/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/6.5.1/webfonts/fa-regular-400.woff2" />
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css" />
<link rel="stylesheet" type="text/css" href="../../_static/theme_overrides.css" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="../../_static/scripts/bootstrap.js?digest=8d27b9dea8ad943066ae" />
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=8d27b9dea8ad943066ae" />
<script src="../../_static/vendor/fontawesome/6.5.1/js/all.min.js?digest=8d27b9dea8ad943066ae"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/clipboard.min.js"></script>
<script src="../../_static/copybutton.js"></script>
<script src="../../_static/design-tabs.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'developers/cpp/windows';</script>
<script>
DOCUMENTATION_OPTIONS.theme_version = '0.15.2';
DOCUMENTATION_OPTIONS.theme_switcher_json_url = '/docs/_static/versions.json';
DOCUMENTATION_OPTIONS.theme_switcher_version_match = 'dev/';
DOCUMENTATION_OPTIONS.show_version_warning_banner = true;
</script>
<link rel="canonical" href="https://arrow.apache.org/docs/developers/cpp/windows.html" />
<link rel="icon" href="../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Cross compiling for WebAssembly with Emscripten" href="emscripten.html" />
<link rel="prev" title="Development Guidelines" href="development.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '20']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
<a id="pst-skip-link" class="skip-link" href="#main-content">Skip to main content</a>
<div id="pst-scroll-pixel-helper"></div>
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>
Back to top
</button>
<input type="checkbox"
class="sidebar-toggle"
name="__primary"
id="__primary"/>
<label class="overlay overlay-primary" for="__primary"></label>
<input type="checkbox"
class="sidebar-toggle"
name="__secondary"
id="__secondary"/>
<label class="overlay overlay-secondary" for="__secondary"></label>
<div class="search-button__wrapper">
<div class="search-button__overlay"></div>
<div class="search-button__search-container">
<form class="bd-search d-flex align-items-center"
action="../../search.html"
method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search"
class="form-control"
name="q"
id="search-input"
placeholder="Search the docs ..."
aria-label="Search the docs ..."
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form></div>
</div>
<header class="bd-header navbar navbar-expand-lg bd-navbar">
<div class="bd-header__inner bd-page-width">
<label class="sidebar-toggle primary-toggle" for="__primary">
<span class="fa-solid fa-bars"></span>
</label>
<div class="col-lg-3 navbar-header-items__start">
<div class="navbar-item">
<a class="navbar-brand logo" href="../../index.html">
<img src="../../_static/arrow.png" class="logo__image only-light" alt="Apache Arrow v17.0.0.dev77 - Home"/>
<script>document.write(`<img src="../../_static/arrow-dark.png" class="logo__image only-dark" alt="Apache Arrow v17.0.0.dev77 - Home"/>`);</script>
</a></div>
</div>
<div class="col-lg-9 navbar-header-items">
<div class="me-auto navbar-header-items__center">
<div class="navbar-item">
<nav class="navbar-nav">
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item">
<a class="nav-link nav-internal" href="../../format/index.html">
Specifications
</a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="../index.html">
Development
</a>
</li>
<li class="nav-item dropdown">
<button class="btn dropdown-toggle nav-item" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-controls="pst-nav-more-links">
Implementations
</button>
<ul id="pst-nav-more-links" class="dropdown-menu">
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../c_glib/index.html">
C/GLib
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../cpp/index.html">
C++
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/csharp/README.md">
C#
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://pkg.go.dev/github.com/apache/arrow/go/v17">
Go
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../java/index.html">
Java
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../js/index.html">
JavaScript
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/julia/">
Julia
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/matlab/README.md">
MATLAB
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/nanoarrow/">
nanoarrow
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../python/index.html">
Python
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../r/index.html">
R
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/ruby/README.md">
Ruby
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://docs.rs/crate/arrow/">
Rust
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../status.html">
Implementation Status
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/cpp/">
C++ cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/java/">
Java cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/py/">
Python cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/r/">
R cookbook
</a>
</li>
</ul>
</li>
</ul>
</nav></div>
</div>
<div class="navbar-header-items__end">
<div class="navbar-item navbar-persistent--container">
<script>
document.write(`
<button class="btn navbar-btn search-button-field search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
`);
</script>
</div>
<div class="navbar-item">
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="pst-version-switcher-button-2"
type="button"
class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-2"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-2"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-2">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
`);
</script></div>
<div class="navbar-item">
<script>
document.write(`
<button class="btn btn-sm navbar-btn theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="theme-switch nav-link" data-mode="light"><i class="fa-solid fa-sun fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="dark"><i class="fa-solid fa-moon fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg"></i></span>
</button>
`);
</script></div>
<div class="navbar-item"><ul class="navbar-icon-links navbar-nav"
aria-label="Icon Links">
<li class="nav-item">
<a href="https://github.com/apache/arrow" title="GitHub" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><span><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i></span>
<span class="sr-only">GitHub</span></a>
</li>
<li class="nav-item">
<a href="https://twitter.com/ApacheArrow" title="X" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><span><i class="fa-brands fa-square-x-twitter fa-lg" aria-hidden="true"></i></span>
<span class="sr-only">X</span></a>
</li>
</ul></div>
</div>
</div>
<div class="navbar-persistent--mobile">
<script>
document.write(`
<button class="btn navbar-btn search-button-field search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
`);
</script>
</div>
<label class="sidebar-toggle secondary-toggle" for="__secondary" tabindex="0">
<span class="fa-solid fa-outdent"></span>
</label>
</div>
</header>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<div class="bd-sidebar-primary bd-sidebar">
<div class="sidebar-header-items sidebar-primary__section">
<div class="sidebar-header-items__center">
<div class="navbar-item">
<nav class="navbar-nav">
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item">
<a class="nav-link nav-internal" href="../../format/index.html">
Specifications
</a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="../index.html">
Development
</a>
</li>
<li class="nav-item dropdown">
<button class="btn dropdown-toggle nav-item" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-controls="pst-nav-more-links-2">
Implementations
</button>
<ul id="pst-nav-more-links-2" class="dropdown-menu">
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../c_glib/index.html">
C/GLib
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../cpp/index.html">
C++
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/csharp/README.md">
C#
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://pkg.go.dev/github.com/apache/arrow/go/v17">
Go
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../java/index.html">
Java
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../js/index.html">
JavaScript
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/julia/">
Julia
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/matlab/README.md">
MATLAB
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/nanoarrow/">
nanoarrow
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../python/index.html">
Python
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../r/index.html">
R
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://github.com/apache/arrow/blob/main/ruby/README.md">
Ruby
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://docs.rs/crate/arrow/">
Rust
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-internal" href="../../status.html">
Implementation Status
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/cpp/">
C++ cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/java/">
Java cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/py/">
Python cookbook
</a>
</li>
<li class="nav-item">
<a class="nav-link dropdown-item nav-external" href="https://arrow.apache.org/cookbook/r/">
R cookbook
</a>
</li>
</ul>
</li>
</ul>
</nav></div>
</div>
<div class="sidebar-header-items__end">
<div class="navbar-item">
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="pst-version-switcher-button-3"
type="button"
class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-3"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-3"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-3">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
`);
</script></div>
<div class="navbar-item">
<script>
document.write(`
<button class="btn btn-sm navbar-btn theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="theme-switch nav-link" data-mode="light"><i class="fa-solid fa-sun fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="dark"><i class="fa-solid fa-moon fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg"></i></span>
</button>
`);
</script></div>
<div class="navbar-item"><ul class="navbar-icon-links navbar-nav"
aria-label="Icon Links">
<li class="nav-item">
<a href="https://github.com/apache/arrow" title="GitHub" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><span><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i></span>
<span class="sr-only">GitHub</span></a>
</li>
<li class="nav-item">
<a href="https://twitter.com/ApacheArrow" title="X" class="nav-link" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><span><i class="fa-brands fa-square-x-twitter fa-lg" aria-hidden="true"></i></span>
<span class="sr-only">X</span></a>
</li>
</ul></div>
</div>
</div>
<div class="sidebar-primary-items__start sidebar-primary__section">
<div class="sidebar-primary-item">
<nav class="bd-docs-nav bd-links"
aria-label="Section Navigation">
<p class="bd-links__title" role="heading" aria-level="1">Section Navigation</p>
<div class="bd-toc-item navbar-nav"><ul class="current nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../bug_reports.html">Bug reports and feature requests</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../guide/index.html">New Contributor’s Guide</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-1"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../guide/architectural_overview.html">Architectural Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="../guide/communication.html">Communication</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../guide/step_by_step/index.html">Steps in making your first PR</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-2"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/set_up.html">Set up</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/building.html">Building the Arrow libraries 🏋🏿‍♀️</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/finding_issues.html">Finding good first issues 🔎</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/arrow_codebase.html">Working on the Arrow codebase 🧐</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/testing.html">Testing 🧪</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/styling.html">Styling 😎</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/step_by_step/pr_lifecycle.html">Lifecycle of a pull request</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../guide/documentation.html">Helping with documentation</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../guide/tutorials/index.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-3"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../guide/tutorials/python_tutorial.html">Python tutorial</a></li>
<li class="toctree-l3"><a class="reference internal" href="../guide/tutorials/r_tutorial.html">R tutorials</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../guide/resources.html">Additional information and resources</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../overview.html">Contributing Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../reviewing.html">Reviewing contributions</a></li>
<li class="toctree-l1 current active has-children"><a class="reference internal" href="index.html">C++ Development</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="building.html">Building Arrow C++</a></li>
<li class="toctree-l2"><a class="reference internal" href="development.html">Development Guidelines</a></li>
<li class="toctree-l2 current active"><a class="current reference internal" href="#">Developing on Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="emscripten.html">Cross compiling for WebAssembly with Emscripten</a></li>
<li class="toctree-l2"><a class="reference internal" href="conventions.html">Conventions</a></li>
<li class="toctree-l2"><a class="reference internal" href="fuzzing.html">Fuzzing Arrow C++</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../java/index.html">Java Development</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-5"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../java/building.html">Building Arrow Java</a></li>
<li class="toctree-l2"><a class="reference internal" href="../java/development.html">Development Guidelines</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../python.html">Python Development</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../continuous_integration/index.html">Continuous Integration</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-6"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../continuous_integration/overview.html">Continuous Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../continuous_integration/docker.html">Running Docker Builds</a></li>
<li class="toctree-l2"><a class="reference internal" href="../continuous_integration/archery.html">Daily Development using Archery</a></li>
<li class="toctree-l2"><a class="reference internal" href="../continuous_integration/crossbow.html">Packaging and Testing with Crossbow</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../benchmarks.html">Benchmarks</a></li>
<li class="toctree-l1"><a class="reference internal" href="../documentation.html">Building the Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release.html">Release Management Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_verification.html">Release Verification Process</a></li>
</ul>
</div>
</nav></div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
</div>
<div id="rtd-footer-container"></div>
</div>
<main id="main-content" class="bd-main">
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item">
<nav aria-label="Breadcrumb">
<ul class="bd-breadcrumbs">
<li class="breadcrumb-item breadcrumb-home">
<a href="../../index.html" class="nav-link" aria-label="Home">
<i class="fa-solid fa-home"></i>
</a>
</li>
<li class="breadcrumb-item"><a href="../index.html" class="nav-link">Development</a></li>
<li class="breadcrumb-item"><a href="index.html" class="nav-link">C++ Development</a></li>
<li class="breadcrumb-item active" aria-current="page">Developing...</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article">
<section id="developing-on-windows">
<span id="developers-cpp-windows"></span><h1>Developing on Windows<a class="headerlink" href="#developing-on-windows" title="Permalink to this heading">#</a></h1>
<p>Like Linux and macOS, we have worked to enable builds to work “out of the box”
with CMake for a reasonably large subset of the project.</p>
<section id="system-setup">
<span id="windows-system-setup"></span><h2>System Setup<a class="headerlink" href="#system-setup" title="Permalink to this heading">#</a></h2>
<p>Microsoft provides the free Visual Studio Community edition. When doing
development in the shell, you must initialize the development environment
each time you open the shell.</p>
<p>For Visual Studio 2017, execute the following batch script:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat&quot;</span><span class="w"> </span>-arch<span class="o">=</span>amd64
</pre></div>
</div>
<p>For Visual Studio 2019, the script is:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat&quot;</span><span class="w"> </span>-arch<span class="o">=</span>amd64
</pre></div>
</div>
<p>One can configure a console emulator like <a class="reference external" href="https://cmder.app/">cmder</a> to
automatically launch this when starting a new development console.</p>
</section>
<section id="using-conda-forge-for-build-dependencies">
<h2>Using conda-forge for build dependencies<a class="headerlink" href="#using-conda-forge-for-build-dependencies" title="Permalink to this heading">#</a></h2>
<p><a class="reference external" href="https://conda.io/miniconda.html">Miniconda</a> is a minimal Python distribution
including the <a class="reference external" href="https://conda.io">conda</a> package manager. Some members of the
Apache Arrow community participate in the maintenance of <a class="reference external" href="https://conda-forge.org/">conda-forge</a>, a community-maintained cross-platform package
repository for conda.</p>
<p>To use <code class="docutils literal notranslate"><span class="pre">conda-forge</span></code> for your C++ build dependencies on Windows, first
download and install a 64-bit distribution from the <a class="reference external" href="https://conda.io/miniconda.html">Miniconda homepage</a></p>
<p>To configure <code class="docutils literal notranslate"><span class="pre">conda</span></code> to use the <code class="docutils literal notranslate"><span class="pre">conda-forge</span></code> channel by default, launch a
command prompt (<code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code>), run the initialization command shown
<a class="reference internal" href="#windows-system-setup"><span class="std std-ref">above</span></a> (<code class="docutils literal notranslate"><span class="pre">vcvarsall.bat</span></code> or <code class="docutils literal notranslate"><span class="pre">VsDevCmd.bat</span></code>), then
run the command:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>config<span class="w"> </span>--add<span class="w"> </span>channels<span class="w"> </span>conda-forge
</pre></div>
</div>
<p>Now, you can bootstrap a build environment (call from the root directory of the
Arrow codebase):</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>create<span class="w"> </span>-y<span class="w"> </span>-n<span class="w"> </span>arrow-dev<span class="w"> </span>--file<span class="o">=</span>ci<span class="se">\c</span>onda_env_cpp.txt
</pre></div>
</div>
<p>Then “activate” this conda environment with:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>activate<span class="w"> </span>arrow-dev
</pre></div>
</div>
<p>If the environment has been activated, the Arrow build system will
automatically see the <code class="docutils literal notranslate"><span class="pre">%CONDA_PREFIX%</span></code> environment variable and use that for
resolving the build dependencies. This is equivalent to setting</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>-DARROW_DEPENDENCY_SOURCE<span class="o">=</span>SYSTEM<span class="w"> </span>^
-DARROW_PACKAGE_PREFIX<span class="o">=</span>%CONDA_PREFIX%<span class="se">\L</span>ibrary
</pre></div>
</div>
<p>To use the Visual Studio IDE with this conda environment activated, launch it by
running the command <code class="docutils literal notranslate"><span class="pre">devenv</span></code> from the same command prompt.</p>
<p>Note that dependencies installed as conda packages are built in release mode and
cannot link with debug builds. If you intend to use <code class="docutils literal notranslate"><span class="pre">-DCMAKE_BUILD_TYPE=debug</span></code>
then you must build the packages from source.
<code class="docutils literal notranslate"><span class="pre">-DCMAKE_BUILD_TYPE=relwithdebinfo</span></code> is also available, which produces a build
that can both be linked with release libraries and be debugged.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you run into any problems using conda packages for dependencies, a very
common problem is mixing packages from the <code class="docutils literal notranslate"><span class="pre">defaults</span></code> channel with those
from <code class="docutils literal notranslate"><span class="pre">conda-forge</span></code>. You can examine the installed packages in your
environment (and their origin) with <code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">list</span></code></p>
</div>
</section>
<section id="using-vcpkg-for-build-dependencies">
<h2>Using vcpkg for build dependencies<a class="headerlink" href="#using-vcpkg-for-build-dependencies" title="Permalink to this heading">#</a></h2>
<p><a class="reference external" href="https://github.com/microsoft/vcpkg">vcpkg</a> is an open source package manager
from Microsoft. It hosts community-contributed ports of C and C++ packages and
their dependencies. Arrow includes a manifest file <a class="reference external" href="https://github.com/apache/arrow/blob/main/cpp/vcpkg.json">cpp/vcpkg.json</a> that specifies
which vcpkg packages are required to build the C++ library.</p>
<p>To use vcpkg for C++ build dependencies on Windows, first
<a class="reference external" href="https://docs.microsoft.com/en-us/cpp/build/install-vcpkg">install</a> and
<a class="reference external" href="https://docs.microsoft.com/en-us/cpp/build/integrate-vcpkg">integrate</a>
vcpkg. Then change working directory in <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> to the root directory
of Arrow and run the command:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>vcpkg<span class="w"> </span>install<span class="w"> </span>^
<span class="w"> </span>--triplet<span class="w"> </span>x64-windows<span class="w"> </span>^
<span class="w"> </span>--x-manifest-root<span class="w"> </span>cpp<span class="w"> </span>^
<span class="w"> </span>--feature-flags<span class="o">=</span>versions<span class="w"> </span>^
<span class="w"> </span>--clean-after-build
</pre></div>
</div>
<p>On Windows, vcpkg builds dynamic link libraries by default. Use the triplet
<code class="docutils literal notranslate"><span class="pre">x64-windows-static</span></code> to build static libraries. vcpkg downloads source
packages and compiles them locally, so installing dependencies with vcpkg is
more time-consuming than with conda.</p>
<p>Then in your <code class="docutils literal notranslate"><span class="pre">cmake</span></code> command, to use dependencies installed by vcpkg, set:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>-DARROW_DEPENDENCY_SOURCE<span class="o">=</span>VCPKG
</pre></div>
</div>
<p>You can optionally set other variables to override the default CMake
configurations for vcpkg, including:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">-DCMAKE_TOOLCHAIN_FILE</span></code>: by default, the CMake scripts automatically find
the location of the vcpkg CMake toolchain file <code class="docutils literal notranslate"><span class="pre">vcpkg.cmake</span></code>; use this to
instead specify its location</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DVCPKG_TARGET_TRIPLET</span></code>: by default, the CMake scripts attempt to infer the
vcpkg
<a class="reference external" href="https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md">triplet</a>;
use this to instead specify the triplet</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DARROW_DEPENDENCY_USE_SHARED</span></code>: default is <code class="docutils literal notranslate"><span class="pre">ON</span></code>; set to <code class="docutils literal notranslate"><span class="pre">OFF</span></code> for
static libraries</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DVCPKG_MANIFEST_MODE</span></code>: default is <code class="docutils literal notranslate"><span class="pre">ON</span></code>; set to <code class="docutils literal notranslate"><span class="pre">OFF</span></code> to ignore the
<code class="docutils literal notranslate"><span class="pre">vcpkg.json</span></code> manifest file and only look for vcpkg packages that are
already installed under the directory where vcpkg is installed</p></li>
</ul>
</section>
<section id="building-using-visual-studio-msvc-solution-files">
<h2>Building using Visual Studio (MSVC) Solution Files<a class="headerlink" href="#building-using-visual-studio-msvc-solution-files" title="Permalink to this heading">#</a></h2>
<p>Change working directory in <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> to the root directory of Arrow and do
an out of source build by generating a MSVC solution:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>cpp
mkdir<span class="w"> </span>build
<span class="nb">cd</span><span class="w"> </span>build
cmake<span class="w"> </span>..<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;Visual Studio 15 2017&quot;</span><span class="w"> </span>-A<span class="w"> </span>x64<span class="w"> </span>^
<span class="w"> </span>-DARROW_BUILD_TESTS<span class="o">=</span>ON
cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release
</pre></div>
</div>
<p>For newer versions of Visual Studio, specify the generator
<code class="docutils literal notranslate"><span class="pre">Visual</span> <span class="pre">Studio</span> <span class="pre">16</span> <span class="pre">2019</span></code> or see <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">--help</span></code> for available
generators.</p>
</section>
<section id="building-with-ninja-and-sccache">
<h2>Building with Ninja and sccache<a class="headerlink" href="#building-with-ninja-and-sccache" title="Permalink to this heading">#</a></h2>
<p>The <a class="reference external" href="https://ninja-build.org/">Ninja</a> build system offers better build
parallelization, and the optional <a class="reference external" href="https://github.com/mozilla/sccache#local">sccache</a> compiler cache keeps track of
past compilations to avoid running them over and over again (in a way similar
to the Unix-specific <code class="docutils literal notranslate"><span class="pre">ccache</span></code>).</p>
<p>Newer versions of Visual Studio include Ninja. To see if your Visual Studio
includes Ninja, run the initialization command shown
<a class="reference internal" href="#windows-system-setup"><span class="std std-ref">above</span></a> (<code class="docutils literal notranslate"><span class="pre">vcvarsall.bat</span></code> or <code class="docutils literal notranslate"><span class="pre">VsDevCmd.bat</span></code>), then
run <code class="docutils literal notranslate"><span class="pre">ninja</span> <span class="pre">--version</span></code>.</p>
<p>If Ninja is not included in your version of Visual Studio, and you are using
conda, activate your conda environment and install Ninja:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>activate<span class="w"> </span>arrow-dev
conda<span class="w"> </span>install<span class="w"> </span>-c<span class="w"> </span>conda-forge<span class="w"> </span>ninja
</pre></div>
</div>
<p>If you are not using conda,
<a class="reference external" href="https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages">install Ninja from another source</a>
.</p>
<p>After installation is complete, change working directory in <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> to the root directory of Arrow and
do an out of source build by generating Ninja files:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>cpp
mkdir<span class="w"> </span>build
<span class="nb">cd</span><span class="w"> </span>build
cmake<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;Ninja&quot;</span><span class="w"> </span>^
<span class="w"> </span>-DARROW_BUILD_TESTS<span class="o">=</span>ON<span class="w"> </span>^
<span class="w"> </span>-DGTest_SOURCE<span class="o">=</span>BUNDLED<span class="w"> </span>..
cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release
</pre></div>
</div>
<p>To use <code class="docutils literal notranslate"><span class="pre">sccache</span></code> in local storage mode you need to set <code class="docutils literal notranslate"><span class="pre">SCCACHE_DIR</span></code>
environment variable before calling <code class="docutils literal notranslate"><span class="pre">cmake</span></code>:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>...
<span class="nb">set</span><span class="w"> </span><span class="nv">SCCACHE_DIR</span><span class="o">=</span>%LOCALAPPDATA%<span class="se">\M</span>ozilla<span class="se">\s</span>ccache
cmake<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;Ninja&quot;</span><span class="w"> </span>^
...
</pre></div>
</div>
</section>
<section id="building-with-nmake">
<h2>Building with NMake<a class="headerlink" href="#building-with-nmake" title="Permalink to this heading">#</a></h2>
<p>Change working directory in <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> to the root directory of Arrow and
do an out of source build using <code class="docutils literal notranslate"><span class="pre">nmake</span></code>:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>cpp
mkdir<span class="w"> </span>build
<span class="nb">cd</span><span class="w"> </span>build
cmake<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;NMake Makefiles&quot;</span><span class="w"> </span>..
nmake
</pre></div>
</div>
</section>
<section id="building-on-msys2">
<h2>Building on MSYS2<a class="headerlink" href="#building-on-msys2" title="Permalink to this heading">#</a></h2>
<p>You can build on MSYS2 terminal, <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> or PowerShell terminal.</p>
<p>On MSYS2 terminal:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>cpp
mkdir<span class="w"> </span>build
<span class="nb">cd</span><span class="w"> </span>build
cmake<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;MSYS Makefiles&quot;</span><span class="w"> </span>..
make
</pre></div>
</div>
<p>On <code class="docutils literal notranslate"><span class="pre">cmd.exe</span></code> or PowerShell terminal, you can use the following batch
file:</p>
<div class="highlight-batch notranslate"><div class="highlight"><pre><span></span><span class="k">setlocal</span>
<span class="c1">REM For 64bit</span>
<span class="k">set</span> <span class="nv">MINGW_PACKAGE_PREFIX</span><span class="p">=</span>mingw-w64-x86_64
<span class="k">set</span> <span class="nv">MINGW_PREFIX</span><span class="p">=</span>c:\msys64\mingw64
<span class="k">set</span> <span class="nv">MSYSTEM</span><span class="p">=</span>MINGW64
<span class="k">set</span> <span class="nv">PATH</span><span class="p">=</span><span class="nv">%MINGW_PREFIX%</span>\bin;c:\msys64\usr\bin;<span class="nv">%PATH%</span>
<span class="k">rmdir</span> /S /Q cpp\build
<span class="k">mkdir</span> cpp\build
<span class="k">pushd</span> cpp\build
cmake -G <span class="s2">&quot;MSYS Makefiles&quot;</span> .. <span class="p">||</span> <span class="k">exit</span> /B
make <span class="p">||</span> <span class="k">exit</span> /B
<span class="k">popd</span>
</pre></div>
</div>
</section>
<section id="building-on-windows-arm64-using-ninja-and-clang">
<h2>Building on Windows/ARM64 using Ninja and Clang<a class="headerlink" href="#building-on-windows-arm64-using-ninja-and-clang" title="Permalink to this heading">#</a></h2>
<p>Ninja and clang can be used for building library on windows/arm64 platform.</p>
<div class="highlight-batch notranslate"><div class="highlight"><pre><span></span><span class="k">cd</span> cpp
<span class="k">mkdir</span> build
<span class="k">cd</span> build
<span class="k">set</span> <span class="nv">CC</span><span class="p">=</span>clang-cl
<span class="k">set</span> <span class="nv">CXX</span><span class="p">=</span>clang-cl
cmake -G <span class="s2">&quot;Ninja&quot;</span> ..
cmake --build . --config Release
</pre></div>
</div>
<p>LLVM toolchain for Windows on ARM64 can be downloaded from LLVM release page <a class="reference external" href="https://releases.llvm.org">LLVM release page</a></p>
<p>Visual Studio (MSVC) cannot be yet used for compiling win/arm64 build due to compatibility issues for dependencies like xsimd and boost library.</p>
<p>Note: This is only an experimental build for WoA64 as all features are not extensively tested through CI due to lack of infrastructure.</p>
</section>
<section id="debug-builds">
<h2>Debug builds<a class="headerlink" href="#debug-builds" title="Permalink to this heading">#</a></h2>
<p>To build a Debug version of Arrow, you should have pre-installed a Debug
version of Boost. It’s recommended to configure <code class="docutils literal notranslate"><span class="pre">cmake</span></code> with the following
variables for Debug build:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">-DARROW_BOOST_USE_SHARED=OFF</span></code>: enables static linking with boost debug
libs and simplifies run-time loading of 3rd parties</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DBOOST_ROOT</span></code>: sets the root directory of boost libs. (Optional)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DBOOST_LIBRARYDIR</span></code>: sets the directory with boost lib files. (Optional)</p></li>
</ul>
<p>The command line to build Arrow in Debug mode will look something like this:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>cpp
mkdir<span class="w"> </span>build
<span class="nb">cd</span><span class="w"> </span>build
cmake<span class="w"> </span>..<span class="w"> </span>-G<span class="w"> </span><span class="s2">&quot;Visual Studio 15 2017&quot;</span><span class="w"> </span>-A<span class="w"> </span>x64<span class="w"> </span>^
<span class="w"> </span>-DARROW_BOOST_USE_SHARED<span class="o">=</span>OFF<span class="w"> </span>^
<span class="w"> </span>-DCMAKE_BUILD_TYPE<span class="o">=</span>Debug<span class="w"> </span>^
<span class="w"> </span>-DBOOST_ROOT<span class="o">=</span>C:/local/boost_1_63_0<span class="w"> </span>^
<span class="w"> </span>-DBOOST_LIBRARYDIR<span class="o">=</span>C:/local/boost_1_63_0/lib64-msvc-14.0
cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Debug
</pre></div>
</div>
</section>
<section id="windows-dependency-resolution-issues">
<h2>Windows dependency resolution issues<a class="headerlink" href="#windows-dependency-resolution-issues" title="Permalink to this heading">#</a></h2>
<p>Because Windows uses <code class="docutils literal notranslate"><span class="pre">.lib</span></code> files for both static and dynamic linking of
dependencies, the static library sometimes may be named something different
like <code class="docutils literal notranslate"><span class="pre">%PACKAGE%_static.lib</span></code> to distinguish itself. If you are statically
linking some dependencies, we provide some options</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">-DBROTLI_MSVC_STATIC_LIB_SUFFIX=%BROTLI_SUFFIX%</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-DSNAPPY_MSVC_STATIC_LIB_SUFFIX=%SNAPPY_SUFFIX%</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-LZ4_MSVC_STATIC_LIB_SUFFIX=%LZ4_SUFFIX%</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-ZSTD_MSVC_STATIC_LIB_SUFFIX=%ZSTD_SUFFIX%</span></code></p></li>
</ul>
<p>To get the latest build instructions, you can reference <a class="reference external" href="https://github.com/apache/arrow/blob/main/ci/appveyor-cpp-build.bat">ci/appveyor-built.bat</a>,
which is used by automated Appveyor builds.</p>
</section>
<section id="statically-linking-to-arrow-on-windows">
<h2>Statically linking to Arrow on Windows<a class="headerlink" href="#statically-linking-to-arrow-on-windows" title="Permalink to this heading">#</a></h2>
<p>The Arrow headers on Windows static library builds (enabled by the CMake
option <code class="docutils literal notranslate"><span class="pre">ARROW_BUILD_STATIC</span></code>) use the preprocessor macro <code class="docutils literal notranslate"><span class="pre">ARROW_STATIC</span></code> to
suppress dllimport/dllexport marking of symbols. Projects that statically link
against Arrow on Windows additionally need this definition. The Unix builds do
not use the macro.</p>
<p>In addition if using <code class="docutils literal notranslate"><span class="pre">-DARROW_FLIGHT=ON</span></code>, <code class="docutils literal notranslate"><span class="pre">ARROW_FLIGHT_STATIC</span></code> needs to
be defined, and similarly for <code class="docutils literal notranslate"><span class="pre">-DARROW_FLIGHT_SQL=ON</span></code>.</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nb">project</span><span class="p">(</span><span class="s">MyExample</span><span class="p">)</span>
<span class="nb">find_package</span><span class="p">(</span><span class="s">Arrow</span><span class="w"> </span><span class="s">REQUIRED</span><span class="p">)</span>
<span class="nb">add_executable</span><span class="p">(</span><span class="s">my_example</span><span class="w"> </span><span class="s">my_example.cc</span><span class="p">)</span>
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">my_example</span>
<span class="w"> </span><span class="s">PRIVATE</span>
<span class="w"> </span><span class="s">arrow_static</span>
<span class="w"> </span><span class="s">arrow_flight_static</span>
<span class="w"> </span><span class="s">arrow_flight_sql_static</span><span class="p">)</span>
<span class="nb">target_compile_definitions</span><span class="p">(</span><span class="s">my_example</span>
<span class="w"> </span><span class="s">PUBLIC</span>
<span class="w"> </span><span class="s">ARROW_STATIC</span>
<span class="w"> </span><span class="s">ARROW_FLIGHT_STATIC</span>
<span class="w"> </span><span class="s">ARROW_FLIGHT_SQL_STATIC</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="downloading-the-timezone-database">
<h2>Downloading the Timezone Database<a class="headerlink" href="#downloading-the-timezone-database" title="Permalink to this heading">#</a></h2>
<p>To run some of the compute unit tests on Windows, the IANA timezone database
and the Windows timezone mapping need to be downloaded first. See
<a class="reference internal" href="../../cpp/build_system.html#download-timezone-database"><span class="std std-ref">Runtime Dependencies</span></a> for download instructions. To set a non-default
path for the timezone database while running the unit tests, set the
<code class="docutils literal notranslate"><span class="pre">ARROW_TIMEZONE_DATABASE</span></code> environment variable.</p>
</section>
<section id="replicating-appveyor-builds">
<h2>Replicating Appveyor Builds<a class="headerlink" href="#replicating-appveyor-builds" title="Permalink to this heading">#</a></h2>
<p>For people more familiar with linux development but need to replicate a failing
appveyor build, here are some rough notes from replicating the
<code class="docutils literal notranslate"><span class="pre">Static_Crt_Build</span></code> (make unittest will probably still fail but many unit
tests can be made with there individual make targets).</p>
<ol class="arabic">
<li><p>Microsoft offers trial VMs for <a class="reference external" href="https://developer.microsoft.com/en-us/windows/downloads/virtual-machines">Windows with Microsoft Visual Studio</a>.
Download and install a version.</p></li>
<li><p>Run the VM and install <a class="reference external" href="https://git-scm.com/">Git</a>, <a class="reference external" href="https://cmake.org/">CMake</a>, and Miniconda or Anaconda (these instructions assume
Anaconda). Also install the <a class="reference external" href="https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019">“Build Tools for Visual Studio”</a>.
Make sure to select the C++ toolchain in the installer wizard, and reboot
after installation.</p></li>
<li><p>Download <a class="reference external" href="https://sourceforge.net/projects/boost/files/boost-binaries/">pre-built Boost debug binaries</a> and install
it.</p>
<p>Run this from an Anaconda/Miniconda command prompt (<em>not</em> PowerShell prompt),
and make sure to run “vcvarsall.bat x64” first. The location of vcvarsall.bat
will depend, it may be under a different path than commonly indicated,
e.g. “<code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files</span> <span class="pre">(x86)\Microsoft</span> <span class="pre">Visual</span> <span class="pre">Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat</span></code>
with the 2019 build tools.</p>
</li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span><span class="nv">$EXTRACT_BOOST_DIRECTORY</span>
.<span class="se">\b</span>ootstrap.bat
@rem<span class="w"> </span>This<span class="w"> </span>is<span class="w"> </span><span class="k">for</span><span class="w"> </span>static<span class="w"> </span>libraries<span class="w"> </span>needed<span class="w"> </span><span class="k">for</span><span class="w"> </span>static_crt_build<span class="w"> </span><span class="k">in</span><span class="w"> </span>appveyor
.<span class="se">\b</span><span class="m">2</span><span class="w"> </span><span class="nv">link</span><span class="o">=</span>static<span class="w"> </span>--with-filesystem<span class="w"> </span>--with-regex<span class="w"> </span>--with-system<span class="w"> </span>install
@rem<span class="w"> </span>this<span class="w"> </span>should<span class="w"> </span>put<span class="w"> </span>libraries<span class="w"> </span>and<span class="w"> </span>headers<span class="w"> </span><span class="k">in</span><span class="w"> </span>c:<span class="se">\B</span>oost
</pre></div>
</div>
<ol class="arabic simple" start="4">
<li><p>Activate anaconda/miniconda:</p></li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>@rem<span class="w"> </span>this<span class="w"> </span>might<span class="w"> </span>differ<span class="w"> </span><span class="k">for</span><span class="w"> </span>miniconda
C:<span class="se">\U</span>sers<span class="se">\U</span>ser<span class="se">\A</span>naconda3<span class="se">\S</span>cripts<span class="se">\a</span>ctivate
</pre></div>
</div>
<ol class="arabic simple" start="5">
<li><p>Clone and change directories to the arrow source code (you might need to
install git).</p></li>
<li><p>Setup environment variables:</p></li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>@rem<span class="w"> </span>Change<span class="w"> </span>the<span class="w"> </span>build<span class="w"> </span><span class="nb">type</span><span class="w"> </span>based<span class="w"> </span>on<span class="w"> </span>which<span class="w"> </span>appveyor<span class="w"> </span>job<span class="w"> </span>you<span class="w"> </span>want.
SET<span class="w"> </span><span class="nv">JOB</span><span class="o">=</span>Static_Crt_Build
SET<span class="w"> </span><span class="nv">GENERATOR</span><span class="o">=</span>Ninja
SET<span class="w"> </span><span class="nv">APPVEYOR_BUILD_WORKER_IMAGE</span><span class="o">=</span>Visual<span class="w"> </span>Studio<span class="w"> </span><span class="m">2017</span>
SET<span class="w"> </span><span class="nv">USE_CLCACHE</span><span class="o">=</span><span class="nb">false</span>
SET<span class="w"> </span><span class="nv">ARROW_BUILD_GANDIVA</span><span class="o">=</span>OFF
SET<span class="w"> </span><span class="nv">ARROW_LLVM_VERSION</span><span class="o">=</span><span class="m">8</span>.0.*
SET<span class="w"> </span><span class="nv">PYTHON</span><span class="o">=</span><span class="m">3</span>.9
SET<span class="w"> </span><span class="nv">ARCH</span><span class="o">=</span><span class="m">64</span>
SET<span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>C:<span class="se">\U</span>sers<span class="se">\U</span>ser<span class="se">\A</span>naconda3<span class="p">;</span>C:<span class="se">\U</span>sers<span class="se">\U</span>ser<span class="se">\A</span>naconda3<span class="se">\S</span>cripts<span class="p">;</span>C:<span class="se">\U</span>sers<span class="se">\U</span>ser<span class="se">\A</span>naconda3<span class="se">\L</span>ibrary<span class="se">\b</span>in<span class="p">;</span>%PATH%
SET<span class="w"> </span><span class="nv">BOOST_LIBRARYDIR</span><span class="o">=</span>C:<span class="se">\B</span>oost<span class="se">\l</span>ib
SET<span class="w"> </span><span class="nv">BOOST_ROOT</span><span class="o">=</span>C:<span class="se">\B</span>oost
</pre></div>
</div>
<ol class="arabic simple" start="7">
<li><p>Run appveyor scripts:</p></li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>install<span class="w"> </span>-c<span class="w"> </span>conda-forge<span class="w"> </span>--file<span class="w"> </span>.<span class="se">\c</span>i<span class="se">\c</span>onda_env_cpp.txt
.<span class="se">\c</span>i<span class="se">\a</span>ppveyor-cpp-setup.bat
@rem<span class="w"> </span>this<span class="w"> </span>might<span class="w"> </span>fail<span class="w"> </span>but<span class="w"> </span>at<span class="w"> </span>this<span class="w"> </span>point<span class="w"> </span>most<span class="w"> </span>unit<span class="w"> </span>tests<span class="w"> </span>should<span class="w"> </span>be<span class="w"> </span>buildable<span class="w"> </span>by<span class="w"> </span>there<span class="w"> </span>individual<span class="w"> </span>targets
@rem<span class="w"> </span>see<span class="w"> </span>next<span class="w"> </span>line<span class="w"> </span><span class="k">for</span><span class="w"> </span>example.
.<span class="se">\c</span>i<span class="se">\a</span>ppveyor-cpp-build.bat
@rem<span class="w"> </span>you<span class="w"> </span>can<span class="w"> </span>also<span class="w"> </span>just<span class="w"> </span>invoke<span class="w"> </span>cmake<span class="w"> </span>directly<span class="w"> </span>with<span class="w"> </span>the<span class="w"> </span>desired<span class="w"> </span>options
cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release<span class="w"> </span>--target<span class="w"> </span>arrow-compute-hash-test
</pre></div>
</div>
</section>
</section>
</article>
<footer class="prev-next-footer">
<div class="prev-next-area">
<a class="left-prev"
href="development.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">Development Guidelines</p>
</div>
</a>
<a class="right-next"
href="emscripten.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Cross compiling for WebAssembly with Emscripten</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</footer>
</div>
<div class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
<div class="sidebar-secondary-item">
<div
id="pst-page-navigation-heading-2"
class="page-toc tocsection onthispage">
<i class="fa-solid fa-list"></i> On this page
</div>
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#system-setup">System Setup</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#using-conda-forge-for-build-dependencies">Using conda-forge for build dependencies</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#using-vcpkg-for-build-dependencies">Using vcpkg for build dependencies</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#building-using-visual-studio-msvc-solution-files">Building using Visual Studio (MSVC) Solution Files</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#building-with-ninja-and-sccache">Building with Ninja and sccache</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#building-with-nmake">Building with NMake</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#building-on-msys2">Building on MSYS2</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#building-on-windows-arm64-using-ninja-and-clang">Building on Windows/ARM64 using Ninja and Clang</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#debug-builds">Debug builds</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#windows-dependency-resolution-issues">Windows dependency resolution issues</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#statically-linking-to-arrow-on-windows">Statically linking to Arrow on Windows</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#downloading-the-timezone-database">Downloading the Timezone Database</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#replicating-appveyor-builds">Replicating Appveyor Builds</a></li>
</ul>
</nav></div>
<div class="sidebar-secondary-item">
<div class="tocsection editthispage">
<a href="https://github.com/apache/arrow/edit/main/docs/source/developers/cpp/windows.rst">
<i class="fa-solid fa-pencil"></i>
Edit on GitHub
</a>
</div>
</div>
</div></div>
</div>
<footer class="bd-footer-content">
</footer>
</main>
</div>
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<script src="../../_static/scripts/bootstrap.js?digest=8d27b9dea8ad943066ae"></script>
<script src="../../_static/scripts/pydata-sphinx-theme.js?digest=8d27b9dea8ad943066ae"></script>
<footer class="bd-footer">
<div class="bd-footer__inner bd-page-width">
<div class="footer-items__start">
<div class="footer-item">
<p class="copyright">
© Copyright 2016-2024 Apache Software Foundation.
Apache Arrow, Arrow, Apache, the Apache feather logo, and the Apache Arrow project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.
<br/>
</p>
</div>
<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.0.
<br/>
</p>
</div>
</div>
<div class="footer-items__end">
<div class="footer-item">
<p class="theme-version">
Built with the <a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html">PyData Sphinx Theme</a> 0.15.2.
</p></div>
</div>
</div>
</footer>
</body>
</html>