Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link graphic library in Borland C++ 3.1

Tags:

c

dos

borland-c++

I want to use graphic library in the DOS application. I add #include <graphics.h> to my source file and build the application with the bcc:

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

However, I get the link errors:

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

The graphics.lib is in the c:\bc3\lib folder. How do I link the graphic library?

like image 459
Leonid F. Avatar asked Nov 14 '22 13:11

Leonid F.


1 Answers

You are using the wrong command. The correct command is:

bcc -3 -ms -P -IC:\BC3\INCLUDE -LC:\BC3\LIB graphics.lib AMtest.c ExtMem.ASM
like image 100
2 revs, 2 users 80% Avatar answered Dec 21 '22 07:12

2 revs, 2 users 80%