![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-31 09:29 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » How to use the Allegro graphics package with Open Watcom? |
| Printable Version 2,894 / 8 |
| Floor1 leobluelion | Posted 2006-06-22 15:32 |
| 新手上路 Posts 3 Credits 12 | |
|
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 ] |
|
| Floor2 070 | Posted 2006-06-22 16:47 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
Theoretically, it should be possible, after all, C language is all about calling functions
|
|
| Floor3 asbai | Posted 2006-06-22 17:14 |
| 高级用户 Posts 252 Credits 653 | |
|
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? ![]() ![]() |
|
| Floor4 070 | Posted 2006-06-22 21:13 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
"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 ![]() |
|
| Floor5 asbai | Posted 2006-06-22 22:37 |
| 高级用户 Posts 252 Credits 653 | |
|
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... ; )
|
|
| Floor6 070 | Posted 2006-06-22 23:24 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
So the hard work of programmers has value; otherwise, there would be too many people living off others in this world
![]() |
|
| Floor7 leobluelion | Posted 2006-06-26 14:56 |
| 新手上路 Posts 3 Credits 12 | |
|
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 ] |
|
| Floor8 stockghost | Posted 2009-05-10 09:47 |
| 中级用户 Posts 105 Credits 215 | |
|
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. |
|
| Floor9 stockghost | Posted 2009-05-10 09:50 |
| 中级用户 Posts 105 Credits 215 | |
|
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. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |