# On Windows, how to use classes in C++ DLL library from Julia?

**URL:** https://discourse.julialang.org/t/on-windows-how-to-use-classes-in-c-dll-library-from-julia/3031
**Category:** General Usage
**Tags:** question, windows, cxxwrap
**Created:** [April 3, 2017, 6:57pm UTC](https://discourse.julialang.org/t/on-windows-how-to-use-classes-in-c-dll-library-from-julia/3031 "2017-04-03T18:57:42Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)
#### Post date: [April 3, 2017, 10:05pm UTC](https://discourse.julialang.org/t/on-windows-how-to-use-classes-in-c-dll-library-from-julia/3031/3 "2017-04-03T22:05:24Z")

</div>

CxxWrap supports using Visual Studio, and in fact does so by default on Windows for now, see:

> **[GitHub - JuliaInterop/CxxWrap.jl: Package to make C++ libraries available in...](https://github.com/JuliaInterop/CxxWrap.jl#building-on-windows)**
>
> Package to make C++ libraries available in Julia. Contribute to JuliaInterop/CxxWrap.jl development by creating an account on GitHub.

This in fact automates what @tkelman suggests. Also, there are caveats when not using the same compiler as Julia even when going through ccall, discussed here for instance:

> [@Windows C++ binary compatibility: MinGW vs MSVC](https://discourse.julialang.org/t/windows-c-binary-compatibility-mingw-vs-msvc/1250):
>
> Creating a new topic to continue the discussion about binary and compiler compatibility started [here](https://discourse.julialang.org/t/qml-jl-first-release/770) in the context of QML.jl. All of this is in the context of CxxWrap.jl, where C++ code is made available in Julia by building a small C++ wrapper library that is accessed from Julia using ccall. CxxWrap itself contains a C++ library, and so does any package built using it. Naturally, all of these have to be compiled with the same compiler for any binaries to be compatible with each other. Further…

---

_[View the full topic](https://discourse.julialang.org/t/on-windows-how-to-use-classes-in-c-dll-library-from-julia/3031)._
