# Cxx.jl and -D flags

**URL:** https://discourse.julialang.org/t/cxx-jl-and-d-flags/9063
**Category:** General Usage
**Tags:** question, cxx
**Created:** [February 14, 2018, 4:26pm UTC](https://discourse.julialang.org/t/cxx-jl-and-d-flags/9063 "2018-02-14T16:26:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vvjn](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vvjn](https://discourse.julialang.org/u/vvjn)
#### Post date: [February 14, 2018, 4:26pm UTC](https://discourse.julialang.org/t/cxx-jl-and-d-flags/9063/1 "2018-02-14T16:26:51Z")

</div>

So I am trying to use Cxx.jl to wrap a C++ library but I’m coming across some issues. As a start, I am converting some C++ code to Cxx.jl. And when I compile the C++, I need to pass a -D flag in order to turn on some options.

E.g. `g++ classification.cpp -DUSE_CUDNN -I/blah/ -lblah`

But I don’t know how to turn on this option for Cxx.jl. Is this possible to do in Cxx.jl? And it’s not, is there any alternative ways of doing this? Thanks.

---

<div class="post-metadata">

### Author: ![vvjn](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vvjn](https://discourse.julialang.org/u/vvjn)
#### Post date: [February 14, 2018, 6:26pm UTC](https://discourse.julialang.org/t/cxx-jl-and-d-flags/9063/2 "2018-02-14T18:26:55Z")

</div>

Okay, I figured it out. I had to both pass the flags while compiling the original library and set `cxx" #define USE_CUDNN "` in my library too.
