# Installing and Using Aravis in Windows

**URL:** <https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420>\
**Category:** Uncategorized\
**Created:** [March 29, 2022, 1:25pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420 "2022-03-29T13:25:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adt47](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adt47](https://aravis-project.discourse.group/u/adt47)\
**Post date:** [March 29, 2022, 1:25pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/1 "2022-03-29T13:25:38Z")

</div>

I am trying to get Aravis working in Windows, but so far I a have had no luck. Can anyone help with the following:

1. Configuring Visual Studio to use Aravis. Specifically, on my property pages what should be included in the following sections:

- Configuration Properties → C/C++ → General → Additional Include Directories

- Configuration Properties → Linker → General → Additional Library Directories

- Configuration Properties → Linker → Input → Additional Dependencies

1. Perhaps the next issue will be resolved when the previous is resolved, but I am writing a test script to mimic the existing test “fake” just to show things are working. I include glib.h and arv.h with no errors, but there are undefined errors for several methods including arv\_get\_n\_devices(). I found this method in arvsystem.h which is included in arv.h. There are 2 include errors in arv.h for arvfeatures.h and arvversions.h. I have searched for these files but can only find arvfeatures.h.in and arvversion.h.in located in aravis/src. What am I missing here?

2. Finally I have a question regarding streaming USB3 cameras. I am trying to create a system where 2 USB3 cameras are utilized on a PC that will only have one USB3 chipset. Is it possible to stream the cameras simultaneously? If not, is it possible to quickly switch between cameras so I could stream the first for ~30sec then quickly switch to the other for ~30sec?

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/free1/user_avatar/aravis-project.discourse.group/emmanuel/32/198_2.png) [@Emmanuel](https://aravis-project.discourse.group/u/Emmanuel)\
**Post date:** [March 30, 2022, 6:47am UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/2 "2022-03-30T06:47:42Z")

</div>

> [@adt47](#):
>
> Perhaps the next issue will be resolved when the previous is resolved, but I am writing a test script to mimic the existing test “fake” just to show things are working. I include glib.h and arv.h with no errors, but there are undefined errors for several methods including arv\_get\_n\_devices(). I found this method in arvsystem.h which is included in arv.h. There are 2 include errors in arv.h for arvfeatures.h and arvversions.h. I have searched for these files but can only find arvfeatures.h.in and arvversion.h.in located in aravis/src. What am I missing here?

These 2 files are built during Aravis compilation, and will be found in the header installation directory.

> [@adt47](#):
>
> Finally I have a question regarding streaming USB3 cameras. I am trying to create a system where 2 USB3 cameras are utilized on a PC that will only have one USB3 chipset. Is it possible to stream the cameras simultaneously? If not, is it possible to quickly switch between cameras so I could stream the first for ~30sec then quickly switch to the other for ~30sec?

Yes, it will be possible to stream the 2 cameras simultaneously, as long as the data stream does not exceed the USB bus bandwidth.

But is is also possible to start/stop the video stream for each camera using `arv_camera_start_acquisition()` and `arv_camera_stop_acquisition()`.

Cheers.

---

<div class="post-metadata">

**Author:** ![adt47](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adt47](https://aravis-project.discourse.group/u/adt47)\
**Post date:** [March 30, 2022, 1:14pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/3 "2022-03-30T13:14:45Z")

</div>

Thanks Emmanuel, this helped. I no longer have library include errors.  
The only error remaining appears to be the definition of ARV\_API.  
Any place the code uses ARV\_API, I get an error that says “explicit type is missing (‘int’ assumed)”.  
I’m not sure what to do here. The project can see arvapi.h, and libaravis-0.8-0.dll is added as an additional dependency under Linker → Input

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/free1/user_avatar/aravis-project.discourse.group/emmanuel/32/198_2.png) [@Emmanuel](https://aravis-project.discourse.group/u/Emmanuel)\
**Post date:** [March 30, 2022, 1:50pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/4 "2022-03-30T13:50:17Z")

</div>

What is the content of `arvapi.h` ?

This one is also generated during compilation. ARV\_API define depends on the platform and compiler.

---

<div class="post-metadata">

**Author:** ![adt47](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adt47](https://aravis-project.discourse.group/u/adt47)\
**Post date:** [March 30, 2022, 2:05pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/5 "2022-03-30T14:05:09Z")

</div>

Here is the contents of arvapi.h:  
#ifndef ARV\_API\_H  
#define ARV\_API\_H

#if !defined (ARV\_H\_INSIDE) && !defined (ARAVIS\_COMPILATION)  
#error “Only \<arv.h\> can be included directly.”  
#endif

#define ARV\_API extern **attribute** ((visibility (“default”)))

#endif

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/free1/user_avatar/aravis-project.discourse.group/emmanuel/32/198_2.png) [@Emmanuel](https://aravis-project.discourse.group/u/Emmanuel)\
**Post date:** [March 30, 2022, 3:52pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/6 "2022-03-30T15:52:36Z")

</div>

> [@adt47](#):
>
> #define ARV\_API extern **attribute** ((visibility (“default”)))

That is probably the issue. If you want to compile your project with msvc, ARV\_API should be `__declspec(dllexport) extern`

I guess you have compiled aravis using gcc or clang, and try to use the project now using msvc. I don’t know much about the Windows platform, but I think that will not work.

---

<div class="post-metadata">

**Author:** ![adt47](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adt47](https://aravis-project.discourse.group/u/adt47)\
**Post date:** [April 13, 2022, 2:41pm UTC](https://aravis-project.discourse.group/t/installing-and-using-aravis-in-windows/420/7 "2022-04-13T14:41:04Z")

</div>

Ok, I’m trying to compile Aravis with MSVC now. I see the file aravis-msvc.yml and it looks like there should be some script that works with this to generate the conanfile.txt. Am I missing something?
