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

endwin() function will not link #20610

Open
2 of 7 tasks
vero-board opened this issue Apr 10, 2024 · 4 comments
Open
2 of 7 tasks

endwin() function will not link #20610

vero-board opened this issue Apr 10, 2024 · 4 comments
Labels

Comments

@vero-board
Copy link

Description / Steps to reproduce the issue

Just for a bit of fun I downloaded the original version of Rogue from https://github.com/Davidslv/rogue
Installed every thing necessary to build it using GCC from msys2 using ming64 mingw-w64-x86_64-pdcurses.
Using Eclipse created and build the project with the correct references to the pdcurses library and header, which it finds.
using static linking.

The code compiles except for;
main.c line 240, 241
curscr->_cury = oy;
curscr->_curx = ox;

Commented the two lines out. All compiled, but failed to link because endwin() external reference can not be resolved.
main.c:129:(.text+0x368): undefined reference to `endwin_x64_4400'.

also get

Description Resource Path Location Type
monsters.o:C:/Users/owner/Documents/Docs/Projects/Software/rogue/Debug/../monsters.c:163: more undefined references to endwin_x64_4400' follow rogue54 C/C++ Problem undefined reference to __imp_BitBlt' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_ChooseFontW' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_CommDlgExtendedError' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem
undefined reference to __imp_CreateCompatibleBitmap' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem undefined reference to __imp_CreateCompatibleDC' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_CreateFontIndirectW' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_CreatePen' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem
undefined reference to __imp_DeleteObject' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_DeleteObject' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_ExtTextOutW' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_GetFontUnicodeRanges' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_GetStockObject' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem undefined reference to __imp_GetTextMetricsW' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_LineTo' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_MoveToEx' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem
undefined reference to __imp_PlaySoundW' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcutil.o) C/C++ Problem undefined reference to __imp_Rectangle' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_SelectObject' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_SelectObject' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcscrn.o) C/C++ Problem
undefined reference to __imp_SetBkColor' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem undefined reference to __imp_SetTextColor' rogue54 line 0, external location: C:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\msys64\mingw64\lib\libpdcurses.a(pdcdisp.o) C/C++ Problem
undefined reference to endwin_x64_4400' rogue54 line 0, external location: main.c:129 C/C++ Problem undefined reference to endwin_x64_4400' rogue54 line 0, external location: main.c:176 C/C++ Problem
undefined reference to endwin_x64_4400' rogue54 line 0, external location: main.c:222 C/C++ Problem undefined reference to endwin_x64_4400' rogue54 line 0, external location: main.c:342 C/C++ Problem
undefined reference to `endwin_x64_4400' rogue54 line 0, external location: main.c:362 C/C++ Problem

Updated MSYS2 09/04/24

Unable to find a way to resolve this. Google search Search did not find anything. Help.

Expected behavior

for the program to link to a .exe file

Actual behavior

Failed to link

Verification

Windows Version

MSYS_NT-10.0-19045

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

no

@vero-board vero-board added the bug label Apr 10, 2024
@Biswa96
Copy link
Member

Biswa96 commented Apr 18, 2024

How did you compile it?

@vero-board
Copy link
Author

vero-board commented Apr 18, 2024 via email

@vero-board
Copy link
Author

When linking against library pdcurses.a from ming64 mingw-w64-x86_64-pdcurses
Compiling using mingw64 libraries
Results in the following C linking error
undefined reference to `endwin_x64_4400'.

Repeated the same procedure using the ncurses mingw64 package and got the same result.

To get around this problem. downloaded source from
https://github.com/Bill-Gray/PDCursesMod.git
compiled using mingw64
Changed reference in application to point to new library
Re-compiled, without error

Conclusion MSYS PDCUSES and NCURSES packages are out of date

@vero-board
Copy link
Author

Also PDCURSES and NCURSES will not link statically. this means that the .DLL have to be in the same folder of path as the application.

try it your self just download https://github.com/Davidslv/rogue and try to compile it against themsys2 pdcurses package

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

No branches or pull requests

2 participants