-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error compiling on Cygwin #40
Comments
Nope. Thanks for testing. :) |
Since this occurs on Cygwin can someone of the community please do this? |
Bump. I am also getting the same error! |
@thunderactual mind helping :) ? |
Same error here - what can I do to fix this? ➜ cmatrix git:(master) make |
@thorstenkampe @thunderactual if you delete lines 252–260 in cmatrix.c before ./configure, you can compile without problems on cygwin. Downside: if you resize screen, you have to restart cmartix. |
On some systems, these are macros that expand to function getters which cannot be assigned to. fixes abishekvashok#40
This also happens on Linux. |
@FliegendeWurst really? If so can you state your software stack? I meant, the os, and other details that couldd help to investigate such a case? |
I'm using Opensuse Tumbleweed (update 20180925) and |
The same problem on OpenSuSE 15 cpp on cmatrix.c changes COLS to _nc_COLS() . |
I made a temporary patch. diff --git a/cmatrix.c b/cmatrix.c
index 73e069f..c1d846e 100644
--- a/cmatrix.c
+++ b/cmatrix.c
@@ -239,6 +239,7 @@ void sighandler(int s) {
#endif
void resize_screen(void) {
+ int lines, cols;
#ifdef _WIN32
BOOL result;
HANDLE hStdHandle;
@@ -261,8 +262,8 @@ void resize_screen(void) {
result = GetConsoleScreenBufferInfo(hStdHandle, &csbiInfo);
if(!result)
return;
- LINES = csbiInfo.dwSize.Y;
- COLS = csbiInfo.dwSize.X;
+ lines = csbiInfo.dwSize.Y;
+ cols = csbiInfo.dwSize.X;
#else
}
fd = open(tty, O_RDWR);
@@ -274,21 +275,21 @@ void resize_screen(void) {
return;
}
- COLS = win.ws_col;
- LINES = win.ws_row;
+ cols = win.ws_col;
+ lines = win.ws_row;
#endif
- if(LINES <10){
- LINES = 10;
+ if(lines <10){
+ lines = 10;
}
- if(COLS <10){
- COLS = 10;
+ if(cols <10){
+ cols = 10;
}
#ifdef HAVE_RESIZETERM
- resizeterm(LINES, COLS);
+ resizeterm(lines, cols);
#ifdef HAVE_WRESIZE
- if (wresize(stdscr, LINES, COLS) == ERR) {
+ if (wresize(stdscr, lines, cols) == ERR) {
c_die("Cannot resize window!");
}
#endif /* HAVE_WRESIZE */
diff --git a/configure.ac b/configure.ac
index 1078f14..8499cce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AM_INIT_AUTOMAKE
AC_CANONICAL_HOST
case $host in
- *mingw*)
+ *mingw*|*cygwin*)
;;
*)
native_windows=no
|
For guys running openSUSI, can you please try compiling by using Reference: https://bugzilla.opensuse.org/show_bug.cgi?id=918553 I kinda have a patch for Cygwin but before that can you make sure you have curses installed and is accessible by Cygwin? @fd00 @thorstenkampe @thunderactual as LINES and COLS are defined in curses.h |
Hey, it might work but clearly, we have to give up resizing here which is not acceptable :P |
Hi @abishekvashok! I tried compiling cmatrix today on MSYS2. It does complain about diff --git a/cmatrix.c b/cmatrix.c
index d1f6b98..26d0648 100644
--- a/cmatrix.c
+++ b/cmatrix.c
@@ -48,7 +48,7 @@
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
-#include <curses.h>
+#include <ncurses/curses.h>
#endif
#ifdef HAVE_SYS_IOCTL_H (This should ideally be wrapped under an The project compiles, but while running cmatrix.exe, I get this No terminal seems to work - mintty, Windows Terminal, Console Host etc. |
@rashil2000 thanks for trying out! This seems like a terminfo issue, can you try installing |
Hi @abishekvashok! You can go through the file lists to see that all the files are there. |
My terminal emulator was setting the |
Hmm interesting. Thanks for staying with this. I will take a dig at this later this day/tomorrow. |
Hi @abishekvashok , any chance you can explain where to make this change?
|
GCC is version 6.4.0. Do you need more information?
The text was updated successfully, but these errors were encountered: