0

I am trying to compile a program for linux using GCC 8.3 x86_64_mingw32 on my windows machine.

It actually is only supposed to open a window using GLFW. The issue is, that X11 is missing, which makes sense on Windows.

I installed multiple X11/developer tools using cygwin and thought that there might be a trick to use this. I am absolutely not sure.

What I found where multiple sources recommending:

  • gcc-core
  • gcc-g++
  • mingw64-x86_64-gcc-core
  • mingw64-x86_64-gcc-g++
  • make
  • gdb
  • xorg-server
  • xorg-server-xorg
  • xorg-x11-fonts-dpi-75
  • xorg-x11-fonts-dpi-100
  • xorg-x11-fonts-misc
  • xorg-x11-fonts-Type-1
  • xinit
  • xlaunch
  • libX11-devel
  • libX11-xcb-devel
  • libXrandr-devel
  • libXinerama-devel
  • libXcursor-devel

Then I added these 2 folders to PATH:

  • C:\cygwin64\bin
  • C:\cygwin64\usr\local\bin

Of course the CMake in Visual Studio Code fails and mentions, that X11 is missing. Is there any way to achieve correct compilation results using CMake in Visual Studio Code on Windows for Linux / X11?

I am actually not sure, how to do it. Adding the source of GLFW just worked with CMake, but adding the source of X11 to a second folder and adding it to the CMakeLists.txt in the same manner does not work. I have to say, that GLFW had a CMakeLists.txt aswell, hence that might be the reason, why it worked with no modifications (at least for Windows builds).

  • Try [x11/xlib with microsoft visual c++] (https://stackoverflow.com/questions/22283867/x11-xlib-with-microsoft-visual-c) – Chief Cook Mar 18 '23 at 23:18

0 Answers0