【问题标题】:Compiling pdcurses with mingw in XP SP3 problem在 XP SP3 问题中使用 mingw 编译 pdcurses
【发布时间】:2009-07-17 06:55:48
【问题描述】:

我在我的机器上编译 pdcurses 3.4 时遇到问题。我的操作系统是 windows XP SP3。

我的 mingw32-make 是 3.81 版。

根据自述文件,我所要做的就是发出一个 make 命令来完成它。所以我做到了。

 mingw32-make -f mingwin32.mak

这启动了制作过程,但它在两个地方的某个地方失败了。一个被忽略,另一个停止生成。

编辑:添加了整个日志,而不仅仅是错误。警告......它很大。如您所见,使用 xcopy 更改副本解决了副本问题。

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.. ../win32/pdcclip.c
gcc -c -O2 -Wall -I.. ../win32/pdcdisp.c
gcc -c -O2 -Wall -I.. ../win32/pdcgetsc.c
gcc -c -O2 -Wall -I.. ../win32/pdckbd.c
gcc -c -O2 -Wall -I.. ../win32/pdcscrn.c
gcc -c -O2 -Wall -I.. ../win32/pdcsetsc.c
gcc -c -O2 -Wall -I.. ../win32/pdcutil.c
ar rcv pdcurses.a addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o clea
r.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o inch.o inchstr.
o initscr.o inopts.o insch.o insstr.o instr.o kernel.o keyname.o mouse.o move.o
outopts.o overlay.o pad.o panel.o printw.o refresh.o scanw.o scr_dump.o scroll.o
slk.o termattr.o terminfo.o touch.o util.o window.o debug.o pdcclip.o pdcdisp.o
pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o pdcutil.o
a - addch.o
a - addchstr.o
a - addstr.o
a - attr.o
a - beep.o
a - bkgd.o
a - border.o
a - clear.o
a - color.o
a - delch.o
a - deleteln.o
a - deprec.o
a - getch.o
a - getstr.o
a - getyx.o
a - inch.o
a - inchstr.o
a - initscr.o
a - inopts.o
a - insch.o
a - insstr.o
a - instr.o
a - kernel.o
a - keyname.o
a - mouse.o
a - move.o
a - outopts.o
a - overlay.o
a - pad.o
a - panel.o
a - printw.o
a - refresh.o
a - scanw.o
a - scr_dump.o
a - scroll.o
a - slk.o
a - termattr.o
a - terminfo.o
a - touch.o
a - util.o
a - window.o
a - debug.o
a - pdcclip.o
a - pdcdisp.o
a - pdcgetsc.o
a - pdckbd.o
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o
xcopy pdcurses.a panel.a
Does panel.a specify a file name
or directory name on the target
(F = file, D = directory)? F
C:pdcurses.a
1 File(s) copied
gcc -O2 -Wall -I.. -otestcurs.exe ../demos/testcurs.c pdcurses.a
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc08fFD9.o:testcurs.c:(.text+0x71c): undefine
d reference to `__ctype_ptr'
pdcurses.a(initscr.o):initscr.c:(.text+0xed): undefined reference to `_impure_pt
r'
pdcurses.a(initscr.o):initscr.c:(.text+0x31c): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x352): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x388): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x3be): undefined reference to `_impure_p
tr'
pdcurses.a(pdcscrn.o):pdcscrn.c:(.text+0x802): more undefined references to `_im
pure_ptr' follow
collect2: ld returned 1 exit status
mingw32-make: *** [testcurs.exe] Error 1

有谁知道原因可能是什么和/或我如何修复它并编译 pdcurses?提前致谢。

-左撇子

【问题讨论】:

  • 请提供日志的前一页。看看之前发生了什么很有趣。

标签: makefile mingw pdcurses


【解决方案1】:

尝试在 Makefile 中将 copy 替换为 xcopy。这可能会有所帮助。

另外,你可以看看here

【讨论】:

  • 感谢 xcopy,它确实可以复制它。关于您提供的链接究竟是什么意思?我确实安装了 cygwin,你认为它可能会与 mingw 混淆?我需要卸载 cygwin 吗?
  • 可能是。问题似乎是包含了错误的 io.h。
  • 是的,你是对的!说实话,我不知道 io.h 实际上是什么。我搜索了一下,发现它在我的另外两个文件夹中。 AVR 工具链和 blackfin 工具链。两者都是微控制器工具链,一个用于 AVR 微处理器,另一个用于 Blackfin 系列处理器。我在这两个方面都做了一些项目,所以他们都在路上。我不知道 mingw 的 io.h 到底是什么弄乱了,但是从路径中删除这两个解决了问题,并且 pdcurses 的编译正确发生。问题是我不确定 100% 为什么会发生。
  • 也许其中一个 io.h 引用了一些与内部实现相关的符号,这些符号肯定不存在于您的 mingw 库中。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-03-21
  • 2010-09-16
  • 2013-04-29
  • 1970-01-01
  • 2021-12-21
  • 2018-01-03
  • 2013-12-02
相关资源
最近更新 更多