Skip to content

Errors building on windows with MSYS2 #1747

Description

@johnroper100

I'm trying to build OLA on Windows with MSYS2. I've been following this guide:

https://wiki.openlighting.org/index.php/Building_OLA_for_Windows

The

autoreconf -i -f

and

./configure --enable-python-libs --disable-e131 --disable-karate --disable-milinst --disable-renard --disable-spi --disable-stageprofi --disable-usbpro --disable-usbdmx --disable-uart

commands worked, but when I run make, I'm getting the following errors:

In file included from ./include/ola/io/SelectServer.h:30,
                 from ./include/ola/client/ClientWrapper.h:41,
                 from examples/ola-client.cpp:27:
./include/ola/thread/Thread.h:38:40: error: 'ptw32_handle_t' does not name a type
   38 |                                  const ptw32_handle_t &handle) {
      |                                        ^~~~~~~~~~~~~~
./include/ola/thread/Thread.h: In function 'std::ostream& operator<<(std::ostream&, const int&)':
./include/ola/thread/Thread.h:39:20: error: request for member 'p' in 'handle', which is of non-class type 'const int'
   39 |   stream << handle.p;
      |                    ^

and

examples/ola-client.cpp: In function 'void ListPorts(const std::vector<_Tp>&, bool)':
examples/ola-client.cpp:116:31: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'int')
  116 |         cout << ", priority " << static_cast<int>(port_iter->Priority());
      |         ~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |              |                   |
      |              |                   int
      |              std::basic_ostream<char>

and

examples/ola-client.cpp:123:31: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'int')
  123 |           cout << "override " << static_cast<int>(port_iter->Priority());
      |           ~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                |                 |
      |                |                 int
      |                std::basic_ostream<char>

Can anyone help with this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions