【问题标题】:Link graphic library in Borland C++ 3.1Borland C++ 3.1 中的链接图形库
【发布时间】:2011-11-27 09:34:54
【问题描述】:

我想在 DOS 应用程序中使用图形库。 我将#include <graphics.h> 添加到我的源文件并使用密件抄送构建应用程序:

bcc -3 -ms  -P -IC:\BC3\INCLUDE -LC:\BC3\LIB AMtest.c ExtMem.ASM 

但是,我收到链接错误:

Turbo Link  Version 5.1 Copyright (c) 1992 Borland International

Error: Undefined symbol _closegraph in module amtest.c
Error: Undefined symbol _outtext in module amtest.c
Error: Undefined symbol _moveto in module amtest.c
Error: Undefined symbol _settextstyle in module amtest.c
Error: Undefined symbol _setcolor in module amtest.c
Error: Undefined symbol _settextjustify in module amtest.c
Error: Undefined symbol _graphresult in module amtest.c
Error: Undefined symbol _initgraph in module amtest.c

graphics.lib 位于 c:\bc3\lib 文件夹中。如何链接图形库?

【问题讨论】:

  • 你试过了吗:bcc -3 -ms -P -IC:\BC3\INCLUDE -LC:\BC3\LIB -lgraphics AMtest.c ExtMem.ASM
  • 我收到错误:Fatal: Unknown option
  • 它是-lgraphicl = 'ell')。
  • 我仍然收到错误:Fatal: Unknown option
  • -lgraphics(以 s 结尾)...

标签: c dos borland-c++


【解决方案1】:

您使用了错误的命令。正确的命令是:

bcc -3 -ms -P -IC:\BC3\INCLUDE -LC:\BC3\LIB graphics.lib AMtest.c ExtMem.ASM

【讨论】:

    猜你喜欢
    • 2011-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-02
    • 1970-01-01
    相关资源
    最近更新 更多