Windows Compiling

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Lubovic59
Posts: 5
Joined: Friday 30 October 2020 15:39
Target OS: Windows
Domoticz version: 2022.1
Contact:

Windows Compiling

Post by Lubovic59 »

Hello,

To work nice with aeotec zwa021, I want to try to modify the openzwave that is bundled with the domoticz installation windows.
So I installed Visual Studio 2019, all the dependencies etc, but I have a problem with the includes in some files :

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "mosquitto.h" domoticz C:\Users\Ludovic\source\repos\domoticz\main\mosquitto_helper.h 10

Error (active) E1696 cannot open source file "minizip/unzip.h" domoticz C:\Users\Ludovic\source\repos\domoticz\webserver\request_handler.hpp 17

Error (active) E1696 cannot open source file "iowin32.h" domoticz C:\Users\Ludovic\source\repos\domoticz\webserver\request_handler.hpp 19

I installed boost and some other package using vcpkg.

Can you help me in compiling this please ?

Thanks
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Windows Compiling

Post by Dnpwwo »

@Lubovic59,

You need to follow these instructions: https://www.domoticz.com/wiki/Windows#Compiling and use the libraries and includes from https://github.com/domoticz/win32-libra ... braries.7z
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Lubovic59
Posts: 5
Joined: Friday 30 October 2020 15:39
Target OS: Windows
Domoticz version: 2022.1
Contact:

Re: Windows Compiling

Post by Lubovic59 »

Dnpwwo wrote: Saturday 31 October 2020 2:11 @Lubovic59,

You need to follow these instructions: https://www.domoticz.com/wiki/Windows#Compiling and use the libraries and includes from https://github.com/domoticz/win32-libra ... braries.7z
Hi Dnpwwo and thanks for your answer,

That's exactly that I did, and Visual Studo was missing a lot of package with this method ( boost, json, cereal etc . )
So I installed some package but the error message that I showed in my first page are still here.
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Windows Compiling

Post by Dnpwwo »

Personally I had to add some additional include directories under C/C++ General but I wasn't sure if that was just an issue for me.
  • ./Windows Libraries/Boost
  • ./Windows Libraries/openssl
  • ./Windows Libraries/Curl
  • ./Windows Libraries/pthread
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Lubovic59
Posts: 5
Joined: Friday 30 October 2020 15:39
Target OS: Windows
Domoticz version: 2022.1
Contact:

Re: Windows Compiling

Post by Lubovic59 »

Dnpwwo wrote: Monday 02 November 2020 1:31 Personally I had to add some additional include directories under C/C++ General but I wasn't sure if that was just an issue for me.
  • ./Windows Libraries/Boost
  • ./Windows Libraries/openssl
  • ./Windows Libraries/Curl
  • ./Windows Libraries/pthread
Okay it's clear now.
I installed all the missing package one by one, and it's working.
I'm sorry but I thought it was problematic because in the windows compiling tutorial they never said to install addtionnnal package.

Now if I want to update my version of domoticz with my modification, I just need to copy the new domoticz.exe into my domoticz folder ?

Thanks,
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Windows Compiling

Post by Dnpwwo »

You can to that but then you won't be able to debug it.

In the Debugging Properties I just set the Working Directory to '..' then you can run/debug it from within Visual Studio itself. Not sure what other do.

Maybe you should update the Wiki with the process you used?
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Lubovic59
Posts: 5
Joined: Friday 30 October 2020 15:39
Target OS: Windows
Domoticz version: 2022.1
Contact:

Re: Windows Compiling

Post by Lubovic59 »

Cool I will try to update the wiki !

Oh and I have another problem :( since I installed my own compiled version of Domoticz, it dosent recognise python on my windows computer...
Everything worked fine with the official exe.

2020-11-02 22:53:31.400 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.

However python is still here :

>python --version
Python 3.8.6

and it's a x86 version. Is there something I'm missing ?

EDIT : I was using the debug version. So it was searching for the debug python. Swhitched to realese fixed the problem.
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Windows Compiling

Post by Dnpwwo »

If you want to run the debug version you can put the 'python3x_d.dll' (and optionally, the associated .pdb file) in the folder where your domoticz.exe is built
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest