remglk icon indicating copy to clipboard operation
remglk copied to clipboard

Cannot compile

Open dSupertramp opened this issue 4 months ago • 4 comments

Hi, Got some trouble compiling everything.

I'm using Windows 11 with MinGW.

I'm just looking for an exe that supports redirection, since the standard one does not support it and I need to interface it with Python.

Thanks in advance!

dSupertramp avatar Jul 20 '25 12:07 dSupertramp

I have not used MinGW. Can you give more detail on the problem?

It may be more helpful to post on https://intfiction.org ; there are regular Windows users there.

erkyrath avatar Jul 20 '25 15:07 erkyrath

I'm not at home right now but basically I only need and exe version that supports redirection

I'll paste some code / details later

dSupertramp avatar Jul 20 '25 15:07 dSupertramp

So, basically I need an exe, and I'm using MSYS2 MINGW64 in order to compile it.

First of all, I update and install everyting:

pacman -Syu
pacman -S git make mingw-w64-x86_64-gcc

After that, I clone the repo and run make inside it.

These are the errors that I got:

$ make
cc -g -Wall -Wno-unused    -c -o main.o main.c
cc -g -Wall -Wno-unused    -c -o rgevent.o rgevent.c
rgevent.c: In function 'glk_select':
rgevent.c:144:17: error: implicit declaration of function 'timespec_get' [-Wimplicit-function-declaration]
  144 |                 timespec_get(&timing_start, TIME_UTC);
      |                 ^~~~~~~~~~~~
rgevent.c:144:45: error: 'TIME_UTC' undeclared (first use in this function)
  144 |                 timespec_get(&timing_start, TIME_UTC);
      |                                             ^~~~~~~~
rgevent.c:144:45: note: each undeclared identifier is reported only once for each function it appears in
rgevent.c: In function 'glk_select_poll':
rgevent.c:195:41: error: 'TIME_UTC' undeclared (first use in this function)
  195 |             timespec_get(&timing_start, TIME_UTC);
      |                                         ^~~~~~~~
rgevent.c: In function 'glk_request_timer_events':
rgevent.c:388:33: error: 'TIME_UTC' undeclared (first use in this function)
  388 |     timespec_get(&timing_start, TIME_UTC);
      |                                 ^~~~~~~~
rgevent.c: In function 'gli_timer_request_since_start':
rgevent.c:422:23: error: 'TIME_UTC' undeclared (first use in this function)
  422 |     timespec_get(&ts, TIME_UTC);
      |                       ^~~~~~~~
make: *** [<builtin>: rgevent.o] Error 1

dSupertramp avatar Jul 21 '25 08:07 dSupertramp

It looks like your version of mingw doesn't support the timespec functions, which were standardized in C11 (2011).

You could try compiling with -std=c11. If that doesn't work, I don't think I can help -- I don't know anything about mingw.

erkyrath avatar Jul 21 '25 14:07 erkyrath