Giter Site home page Giter Site logo

Project builds with visual studio but not ninja and MinGW : error: 'ERROR_INVALID_HANDLE' undeclared (first use in this function) about plibsys HOT 4 CLOSED

BillyTheSquid21 avatar BillyTheSquid21 commented on June 26, 2024
Project builds with visual studio but not ninja and MinGW : error: 'ERROR_INVALID_HANDLE' undeclared (first use in this function)

from plibsys.

Comments (4)

saprykin avatar saprykin commented on June 26, 2024

Can you please provide full output from Step 2? You can paste it through GitHub Gist. As building on Windows with GCC/Clang, in general, is a bit tricky, the following info would be helpful:

  • Which GCC packaging are you using: MinGW or MSYS.
  • Which CMake are you invoking? In general, you should use one coming with MinGW/MSYS.
  • Don you invoke commands from the corresponding environment shell of MinGW/MSYS?

from plibsys.

BillyTheSquid21 avatar BillyTheSquid21 commented on June 26, 2024

Here is the output to step 2

  • I am using MinGW
  • I am using just the default CMake from the installer on their website
  • I am invoking the commands from a default windows cmd terminal

from plibsys.

saprykin avatar saprykin commented on June 26, 2024

Okay, based on the info I assume that you are using MinGW (32-bit), which was installed probably using mingw-get tool. Is this correct? At least with this version I was able to reproduce the problem. However, this version of MinGW is 10 years old, and, moreover, MinGW project is not in development anymore. Basically, the project is dead and outdated. The reason the compilation fails is due to the bugs in the header files supplied by MinGW. You can read a detailed problem explanation here. In short, the compiler does not properly include definitions of Windows error codes. You can potentially hack the headers, but there is no guarantee that you would not break something else.

I cannot fix this broken version of the compiler, but I can recommend you to switch to MinGW-w64 project which provides old and modern versions of GCC for Windows, both 32-bit and 64-bit builds. For example, if you still need GCC 6.3.0 (32-bit build), you can download a precompiled package here. This version works without any issues for me using the steps you have provided.

Another way to obtain a modern GCC (basically, MinGW-w64 builds) version on Windows is to use MSYS2 distribution which comes with a nice package manager. You can read about it also at the local Wiki.

from plibsys.

BillyTheSquid21 avatar BillyTheSquid21 commented on June 26, 2024

Thank you! Switching to MinGW-w64 fixed the issue, I hadn't realised how old that MinGW version was

from plibsys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.