# Error in importing the library

**URL:** https://discourse.slicer.org/t/error-in-importing-the-library/22053
**Category:** Development
**Tags:** vtk, virtual-reality
**Created:** [February 18, 2022, 5:32pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053 "2022-02-18T17:32:01Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![user5](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/user5/32/13217_2.png) [@user5](https://discourse.slicer.org/u/user5)
#### Post date: [February 18, 2022, 5:32pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/1 "2022-02-18T17:32:01Z")

</div>

Sorry that it is my first time to do the project based programming.

I have tried to import library into visual studio for programming .

I follow the tutorial in internet and I imported the VTK modules successfully, but some header file still can not be import, such as vtkMRMLApplicationLogic.h, vtkMRMLScene.h, vtkMRMLModelNode.h which is in the slicer master library.

 ![1234](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/4/24dd383754118a9cf0125d7b1b9bb5a1988ec5fc.png)

I try to use the library directories or import directly, but both method are failed.

Is it have any other way to import the header file?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 18, 2022, 5:43pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/2 "2022-02-18T17:43:22Z")

</div>

To get started, I would recommend to follow the existing modules as examples or use the [templates](https://github.com/Slicer/Slicer/tree/master/Utilities/Templates).

---

<div class="post-metadata">

### Author: ![user5](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/user5/32/13217_2.png) [@user5](https://discourse.slicer.org/u/user5)
#### Post date: [February 18, 2022, 6:16pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/3 "2022-02-18T18:16:00Z")

</div>

Sorry, I do not quite understand your meaning.

Is it mean that I just need to modify in existing extension file?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 18, 2022, 6:19pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/4 "2022-02-18T18:19:38Z")

</div>

Yes, first study existing extensions, understand how they work, make small modifications to them. Once you are confident you can start creating new modules.

---

<div class="post-metadata">

### Author: ![user5](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/user5/32/13217_2.png) [@user5](https://discourse.slicer.org/u/user5)
#### Post date: [February 18, 2022, 6:27pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/5 "2022-02-18T18:27:15Z")

</div>

I have already modified the extensions code, but it needs to export to be .pyd file.

Following the tutorial in internet, I need to build the project successfully first. But some header file which is mention in question cannot be included. It makes cannot able to build project sucessfully.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 18, 2022, 6:35pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/6 "2022-02-18T18:35:57Z")

</div>

You can start with just building an existing extension without any modification. If you have problems with that then let us know what the exact error message is and we should be able to help.

---

<div class="post-metadata">

### Author: ![user5](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/user5/32/13217_2.png) [@user5](https://discourse.slicer.org/u/user5)
#### Post date: [February 18, 2022, 6:46pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/7 "2022-02-18T18:46:50Z")

</div>

![12](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/ebd695b91dcc8c6301603369e0ac56b73953f39a.png)  
It still come out same error.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 18, 2022, 11:58pm UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/8 "2022-02-18T23:58:44Z")

</div>

Have you followed [these instructions](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#windows)?

---

<div class="post-metadata">

### Author: ![user5](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/user5/32/13217_2.png) [@user5](https://discourse.slicer.org/u/user5)
#### Post date: [February 19, 2022, 4:57am UTC](https://discourse.slicer.org/t/error-in-importing-the-library/22053/9 "2022-02-19T04:57:27Z")

</div>

No, I just open the .cxx file directly.

> [@lassoan](#):
>
> [these instructions](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#windows)

I will try to use it to build the project again.  
Thanks for your help.
