# building as dll and include for c++

**URL:** https://discourse.itk.org/t/building-as-dll-and-include-for-c/4608
**Category:** Engineering
**Tags:** cpp, cmake
**Created:** [November 24, 2021, 12:28pm UTC](https://discourse.itk.org/t/building-as-dll-and-include-for-c/4608 "2021-11-24T12:28:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![avispi](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@avispi](https://discourse.itk.org/u/avispi)
#### Post date: [November 24, 2021, 12:28pm UTC](https://discourse.itk.org/t/building-as-dll-and-include-for-c/4608/1 "2021-11-24T12:28:16Z")

</div>

Hi.

I want to try using ITK for some c++ development.  
I want to use it as any other external library I use (such as opencv i.e.)  
Preferably- dll + lib + include  
but also static libs + include is fine

I’m compiling in visual studio 2015  
In CMAKE I run configure and generate (default options)  
I then open the .sln in visual studio and build.  
build is successful.  
I get a lib folder with libraries.  
I try building the INSTALL project as I usually do with other cmake projects but it fails  
I don’t have an include directory

Thanks for any help

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 24, 2021, 2:30pm UTC](https://discourse.itk.org/t/building-as-dll-and-include-for-c/4608/2 "2021-11-24T14:30:10Z")

</div>

> [@avispi](#):
>
> building the INSTALL project … but it fails

What is the error message?

We dropped support for VS2015 (toolset v140) with ITK 5.3, but you are probably using an earlier version as 5.3 should give you an error in the configure step.

---

<div class="post-metadata">

### Author: ![avispi](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@avispi](https://discourse.itk.org/u/avispi)
#### Post date: [December 5, 2021, 1:52pm UTC](https://discourse.itk.org/t/building-as-dll-and-include-for-c/4608/3 "2021-12-05T13:52:42Z")

</div>

Hi.  
Thanks for the help.  
I figured it out.  
There might be a better a way to fix this.  
The problem was that the install folder was defined in c:\program files  
adding a new definition for the CMAKE\_INSTALL\_PREFIX didnt help.  
After configuring, I changed the cmake files which had “c:\program files” in them (2 files I think, in the main directory and the eigen directory) to my desired install directory and it fixed the problem.
