Skip to content
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

I can compile pdcurses3.4 but can't compile curse3.6 #43

Closed
Asimov500 opened this issue Oct 13, 2018 · 5 comments
Closed

I can compile pdcurses3.4 but can't compile curse3.6 #43

Asimov500 opened this issue Oct 13, 2018 · 5 comments

Comments

@Asimov500
Copy link

Asimov500 commented Oct 13, 2018

I am using the mingw compiler with codeblocks and when I try to compile I get these error messages. How do I solve this problem? I have using gcc.exe (tdm-1) 5.1.0 of the compiler which is quite current I think.
PS D:\Download\PDCurses-master\PDCurses-master\wincon> mingw32-make -f Makefile gcc -c -O2 -Wall -I.. ../pdcurses/addch.c gcc -c -O2 -Wall -I.. ../pdcurses/addchstr.c gcc -c -O2 -Wall -I.. ../pdcurses/addstr.c gcc -c -O2 -Wall -I.. ../pdcurses/attr.c gcc -c -O2 -Wall -I.. ../pdcurses/beep.c gcc -c -O2 -Wall -I.. ../pdcurses/bkgd.c gcc -c -O2 -Wall -I.. ../pdcurses/border.c gcc -c -O2 -Wall -I.. ../pdcurses/clear.c gcc -c -O2 -Wall -I.. ../pdcurses/color.c gcc -c -O2 -Wall -I.. ../pdcurses/delch.c gcc -c -O2 -Wall -I.. ../pdcurses/deleteln.c gcc -c -O2 -Wall -I.. ../pdcurses/deprec.c gcc -c -O2 -Wall -I.. ../pdcurses/getch.c gcc -c -O2 -Wall -I.. ../pdcurses/getstr.c gcc -c -O2 -Wall -I.. ../pdcurses/getyx.c gcc -c -O2 -Wall -I.. ../pdcurses/inch.c gcc -c -O2 -Wall -I.. ../pdcurses/inchstr.c gcc -c -O2 -Wall -I.. ../pdcurses/initscr.c gcc -c -O2 -Wall -I.. ../pdcurses/inopts.c gcc -c -O2 -Wall -I.. ../pdcurses/insch.c gcc -c -O2 -Wall -I.. ../pdcurses/insstr.c gcc -c -O2 -Wall -I.. ../pdcurses/instr.c gcc -c -O2 -Wall -I.. ../pdcurses/kernel.c gcc -c -O2 -Wall -I.. ../pdcurses/keyname.c gcc -c -O2 -Wall -I.. ../pdcurses/mouse.c gcc -c -O2 -Wall -I.. ../pdcurses/move.c gcc -c -O2 -Wall -I.. ../pdcurses/outopts.c gcc -c -O2 -Wall -I.. ../pdcurses/overlay.c gcc -c -O2 -Wall -I.. ../pdcurses/pad.c gcc -c -O2 -Wall -I.. ../pdcurses/panel.c gcc -c -O2 -Wall -I.. ../pdcurses/printw.c gcc -c -O2 -Wall -I.. ../pdcurses/refresh.c gcc -c -O2 -Wall -I.. ../pdcurses/scanw.c gcc -c -O2 -Wall -I.. ../pdcurses/scr_dump.c gcc -c -O2 -Wall -I.. ../pdcurses/scroll.c gcc -c -O2 -Wall -I.. ../pdcurses/slk.c gcc -c -O2 -Wall -I.. ../pdcurses/termattr.c gcc -c -O2 -Wall -I.. ../pdcurses/terminfo.c gcc -c -O2 -Wall -I.. ../pdcurses/touch.c gcc -c -O2 -Wall -I.. ../pdcurses/util.c gcc -c -O2 -Wall -I.. ../pdcurses/window.c gcc -c -O2 -Wall -I.. ../pdcurses/debug.c gcc -c -O2 -Wall -I.. ../wincon/pdcclip.c gcc -c -O2 -Wall -I.. ../wincon/pdcdisp.c gcc -c -O2 -Wall -I.. ../wincon/pdcgetsc.c gcc -c -O2 -Wall -I.. ../wincon/pdckbd.c gcc -c -O2 -Wall -I.. ../wincon/pdcscrn.c ../wincon/pdcscrn.c:77:5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX' PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); ^ ../wincon/pdcscrn.c:79:5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX' PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); ^ ../wincon/pdcscrn.c:81:8: error: unknown type name 'SetConsoleScreenBufferInfoExFn' static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL; ^ ../wincon/pdcscrn.c:82:8: error: unknown type name 'GetConsoleScreenBufferInfoExFn' static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL; ^ ../wincon/pdcscrn.c:85:8: error: unknown type name 'CONSOLE_SCREEN_BUFFER_INFOEX' static CONSOLE_SCREEN_BUFFER_INFOEX console_infoex; ^ ../wincon/pdcscrn.c: In function '_set_console_infoex': ../wincon/pdcscrn.c:187:10: error: called object 'pSetConsoleScreenBufferInfoEx' is not a function or function pointer if (!pSetConsoleScreenBufferInfoEx(pdc_con_out, &console_infoex)) ^ ../wincon/pdcscrn.c:81:39: note: declared here static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL; ^ ../wincon/pdcscrn.c: In function '_init_console_infoex': ../wincon/pdcscrn.c:268:19: error: request for member 'cbSize' in something not a structure or union console_infoex.cbSize = sizeof(console_infoex); ^ ../wincon/pdcscrn.c:270:10: error: called object 'pGetConsoleScreenBufferInfoEx' is not a function or function pointer if (!pGetConsoleScreenBufferInfoEx(pdc_con_out, &console_infoex)) ^ ../wincon/pdcscrn.c:82:39: note: declared here static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL; ^ ../wincon/pdcscrn.c:273:19: error: request for member 'srWindow' in something not a structure or union console_infoex.srWindow.Right++; ^ ../wincon/pdcscrn.c:274:19: error: request for member 'srWindow' in something not a structure or union console_infoex.srWindow.Bottom++; ^ ../wincon/pdcscrn.c: In function '_get_colors': ../wincon/pdcscrn.c:284:28: error: request for member 'cbSize' in something not a structure or union if (!console_infoex.cbSize) ^ ../wincon/pdcscrn.c:287:42: error: request for member 'ColorTable' in something not a structure or union (COLORREF *)(&(console_infoex.ColorTable)); ^ ../wincon/pdcscrn.c: In function 'PDC_scr_open': ../wincon/pdcscrn.c:476:10: error: 'GetConsoleScreenBufferInfoExFn' undeclared (first use in this function) (GetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, ^ ../wincon/pdcscrn.c:476:10: note: each undeclared identifier is reported only once for each function it appears in ../wincon/pdcscrn.c:476:41: error: expected ';' before 'GetProcAddress' (GetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, ^ ../wincon/pdcscrn.c:479:10: error: 'SetConsoleScreenBufferInfoExFn' undeclared (first use in this function) (SetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, ^ ../wincon/pdcscrn.c:479:41: error: expected ';' before 'GetProcAddress' (SetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, ^ ../wincon/pdcscrn.c:366:13: warning: variable 'h_kernel' set but not used [-Wunused-but-set-variable] HMODULE h_kernel; ^ ../wincon/pdcscrn.c: In function '_get_colors': ../wincon/pdcscrn.c:295:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:95: recipe for target 'pdcscrn.o' failed mingw32-make: *** [pdcscrn.o] Error 1 PS D:\Download\PDCurses-master\PDCurses-master\wincon>

@wmcbrine
Copy link
Owner

Duplicate of #41

@wmcbrine wmcbrine marked this as a duplicate of #41 Nov 25, 2018
@Asimov500
Copy link
Author

I don't see this as a duplicate as I am using codeblocks and the other post is using MSVC. Also I am not sure why this or the other question has been closed, because the issue has not been solved. The issue is that it is impossible to compile pdcurses 3.6 with codeblocks. So if the issue is not solved, then why is it being closed?

@wmcbrine
Copy link
Owner

wmcbrine commented Dec 2, 2018

It's a different compiler, but it's the same cause. Possibly I should've linked directly to #28, which is also the same, but based on MinGW. Discussion is there.

BTW, gcc 5.1 may be current as far as CodeBlocks is concerned, but mainstream gcc is at 8.2. That isn't actually the problem here, but the problem is similar -- outdated libraries.

@prostouri
Copy link

I apologize for the machine translation and poor knowledge and CVD and do. Thanks in advance for any help. Here's the question. Can't compile PDCurses-3.8 using MinGW compiler latest version. While typing drew attention to the date of the last update using MinGW. Maybe that's the problem. c:\pdcurses\wincon>make-f makefile
make[1]: Enter directory '/c / pdcurses/wincon'
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/addch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/addchstr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/addstr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/attr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/beep ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/bkgd ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/border ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/clear ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/color ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/delch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/deleteln ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/getch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/getstr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/getyx ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/inch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/inchstr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/initscr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/inopts ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/insch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/insstr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/instr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/kernel ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/keyname ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/mouse ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/move ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/outopts ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/overlay ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/pad ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/panel ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/printw ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/refresh ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/scanw ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/scr_dump ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/scroll ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/slk ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/termattr ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/touch ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/util ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/window ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/pdcurses/debug ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/wincon/pdcclip ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/wincon/pdcdisp ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/wincon/pdcgetsc ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/wincon/pdckbd ahhh!after
gcc-c-O2-Wall-IC:\pdcurses C:\pdcurses/wincon/pdcscrn ahhh!after
C:\pdcurses/wincon/pdcscrn.c: 93: 5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX'
PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
^
C:\pdcurses/wincon/pdcscrn.c: 95: 5: error: unknown type name 'PCONSOLE_SCREEN_BUFFER_INFOEX'
PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
^
C:\pdcurses/wincon/pdcscrn.c: 97: 8: Error: unknown type name 'SetConsoleScreenBufferInfoExFn'
static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL;
^
C:\pdcurses/wincon/pdcscrn.c: 98: 8: Error: unknown type name 'GetConsoleScreenBufferInfoExFn'
static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL;
and so on...

@wmcbrine
Copy link
Owner

"If your build stops with errors about PCONSOLE_SCREEN_BUFFER_INFOEX,
add the parameter "INFOEX=N" to your make command line and try again." -- https://github.com/wmcbrine/PDCurses/blob/master/wincon/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants