China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 03:33
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » How to use the Allegro graphics package with Open Watcom? View 2,676 Replies 8
Original Poster Posted 2006-06-22 15:32 ·  中国 广东 珠海 电信
新手上路
Credits 12
Posts 3
Joined 2006-06-22 15:30
20-year member
UID 57403
Status Offline
How to use the Allegro graphics package with Open Watcom? Please help me. Teach me how to install the Allegro graphics package. I'm using Open Watcom 1.5.

[ Last edited by leobluelion on 2006-6-22 at 16:01 ]
Floor 2 Posted 2006-06-22 16:47 ·  中国 福建 三明 电信
高级用户
★★
苏醒的沉睡者
Credits 659
Posts 217
Joined 2003-02-15 00:00
23-year member
UID 930
Gender Male
From 福建
Status Offline
Theoretically, it should be possible, after all, C language is all about calling functions
好久没碰Dos,手都生了,赶紧回来练练.嘿嘿
Floor 3 Posted 2006-06-22 17:14 ·  中国 上海 杨浦区 电信
高级用户
★★
Credits 653
Posts 252
Joined 2006-04-16 19:48
20-year member
UID 53939
Status Offline
1. Correctly configure the environment of Watcom C (paths, environment variables, etc.)
2. Correctly configure the environment of DJGPP. The underlying assembly code of Allegro needs to be handled with DJ's assembler (but don't worry, the final generated library format is that of Watcom).
3. Enter the Allegro directory and type "fix -watcom -crlf", which is equivalent to the configure script under *nix, and will adjust some code and macro definitions for the compiler and platform.
4. make it

To friend 070, "C language all calls functions" is right. Almost all programming languages support procedure and function calls. Even x86 assembly supports it. What direct or even indirect relationship does this have with the portability of the code?
Floor 4 Posted 2006-06-22 21:13 ·  中国 福建 三明 电信
高级用户
★★
苏醒的沉睡者
Credits 659
Posts 217
Joined 2003-02-15 00:00
23-year member
UID 930
Gender Male
From 福建
Status Offline
"Almost all programming languages support procedure and function calls, even x86 assembly supports ",but not all languages need to call functions.
I think the library function is a black box, you don't know what's inside, but you can know what's put into the box and what's taken out of the box. We only need to know the input and output, without having to consider how the process is implemented.
In different systems, you only need to ensure that the input and output of the function are the same, which ensures portability!

Personal shallow view, please forgive me
好久没碰Dos,手都生了,赶紧回来练练.嘿嘿
Floor 5 Posted 2006-06-22 22:37 ·  中国 上海 杨浦区 电信
高级用户
★★
Credits 653
Posts 252
Joined 2006-04-16 19:48
20-year member
UID 53939
Status Offline
Hehe, the key is that allegro itself is such a black box. It has to face various different operating systems and hardware architectures below, which have great differences depending on the platform and compilation environment. Above, it provides a unified API, so for programs based on it, as long as the design is relatively cautious, the portability is still good, but it is very hard for itself to be ported to a new platform... ; )
Floor 6 Posted 2006-06-22 23:24 ·  中国 福建 三明 电信
高级用户
★★
苏醒的沉睡者
Credits 659
Posts 217
Joined 2003-02-15 00:00
23-year member
UID 930
Gender Male
From 福建
Status Offline
So the hard work of programmers has value; otherwise, there would be too many people living off others in this world
好久没碰Dos,手都生了,赶紧回来练练.嘿嘿
Floor 7 Posted 2006-06-26 14:56 ·  中国 广东 珠海 电信
新手上路
Credits 12
Posts 3
Joined 2006-06-22 15:30
20-year member
UID 57403
Status Offline
Thanks for your answers, but I got an error when making it according to the method on the allegro official website.

The error message is:

wcl386 -w1 -zq -fr=nul -bt=dos4g -5s -s -I. -I.\\include -fo=obj\\watcom\\asmdef.obj -fe=obj\\watcom\\asmdef.exe src\\i386\\asmdef.c

make.exe: *** Error -1

Can you send a tutorial? It's best to provide the download of the packages used.

[ Last edited by leobluelion on 2006-6-26 at 15:01 ]
Floor 8 Posted 2009-05-10 09:47 ·  中国 海南 海口 电信
中级用户
★★
Credits 215
Posts 105
Joined 2007-06-02 22:33
19-year member
UID 90083
Gender Male
Status Offline
I also had the same error as the thread starter, but it's fixed.
It's estimated to be a makefile error.
wcl386 -w1 -zq -fr=nul -bt=dos4g -5s -s -I. -I.\\include -fo=obj\\watcom\\asmdef
.obj -fe=obj\\watcom\\asmdef.exe src\\i386\\asmdef.c
is wrong. It should be:
wcl386 -w1 -zq -fr=nul -bt=dos4g -5s -s -I. -I.\include -fo=obj\watcom\asmdef
.obj -fe=obj\watcom\asmdef.exe src\i386\asmdef.c
By manually modifying the input in the command line, this problem is solved.
Floor 9 Posted 2009-05-10 09:50 ·  中国 海南 海口 电信
中级用户
★★
Credits 215
Posts 105
Joined 2007-06-02 22:33
19-year member
UID 90083
Gender Male
Status Offline
Compiling further will encounter assembly errors, need to modify the source code.
Continue compiling, OK!
If you encounter compilation errors in the demo program, don't worry, the lib you need is already ready.
Forum Jump: