|
leobluelion
新手上路

积分 12
发帖 3
注册 2006-6-22
状态 离线
|
『楼 主』:
open watcom 如何使用allegro图形包?
使用 LLM 解释/回答一下
open watcom 如何使用allegro图形包,请各位帮帮忙,教下我怎样安装allegro这个图形包,我用的 是open watcom1.5
Last edited by leobluelion on 2006-6-22 at 16:01 ]
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 ]
|
|
2006-6-22 15:32 |
|
|
070
高级用户
    苏醒的沉睡者
积分 659
发帖 217
注册 2003-2-15 来自 福建
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
理论上应该是可以的,毕竟c 语言都是调用函数的
Theoretically, it should be possible, after all, C language is all about calling functions
|

好久没碰Dos,手都生了,赶紧回来练练.嘿嘿 |
|
2006-6-22 16:47 |
|
|
asbai
高级用户
   
积分 653
发帖 252
注册 2006-4-16
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
1. 正确配置watcom c的环境(路径和环境变量等等)
2. 正确配置djgpp的环境allegro的底层汇编代码要用dj的汇编器搞定(不过放心,最终生成的库格式是watcom的)。
3. 进 allegro 目录,敲 "fix -watcom -crlf",这个相当于 *nix 下的 configure 角本,会针对编译器和平台调整一些代码和宏定义。
4. make it
to 070 兄,“c 语言都是调用函数的” 是的,几乎所有程序设计语言都支持过程和函数调用,连x86汇编都支持,这跟代码的可移植性有什么直接或者那怕是间接的关系吗?  
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? :P:P
|
|
2006-6-22 17:14 |
|
|
070
高级用户
    苏醒的沉睡者
积分 659
发帖 217
注册 2003-2-15 来自 福建
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
"几乎所有程序设计语言都支持过程和函数调用,连x86汇编都支持“,但并不是所有语言都要调用函数阿。
我认为库函数就是一个黑箱子,你不知道里面装的是啥,但你却可以知道放到箱子里和从箱子里拿出来的东西是什么。我们只需知道输入和输出,而不必考虑过程是如何实现的。
在不同的系统,你只需确保函数的输入和输出是一样就可以了,这就保证了可移植性!
个人的浅薄观点,见笑了 
"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 :P
|

好久没碰Dos,手都生了,赶紧回来练练.嘿嘿 |
|
2006-6-22 21:13 |
|
|
asbai
高级用户
   
积分 653
发帖 252
注册 2006-4-16
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
呵呵,关键在于allegro本身就是这个黑箱。它向下要面对各种不同的操作系统和硬件体系结构,这些都随着平台和编译环境不同而存在极大差异。它向上又提供一个统一的API,所以基于它的程序,只要比较谨慎的设计,可移植性还是不错的,但是它自己要移植到一个新平台就很辛苦了。。。。。。 
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... ; )
|
|
2006-6-22 22:37 |
|
|
070
高级用户
    苏醒的沉睡者
积分 659
发帖 217
注册 2003-2-15 来自 福建
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
所以程序员的辛苦劳动才有价值,要不然这世界上有太多的人在吃白食了 
So the hard work of programmers has value; otherwise, there would be too many people living off others in this world :)
|

好久没碰Dos,手都生了,赶紧回来练练.嘿嘿 |
|
2006-6-22 23:24 |
|
|
leobluelion
新手上路

积分 12
发帖 3
注册 2006-6-22
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
谢谢你们的解答,但我 按照allegro官方上的做法去做在make的时候出错了
提示错误为
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
你们能发个教程吗,最好能提供的所用到的 包的下载
Last edited by leobluelion on 2006-6-26 at 15:01 ]
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 ]
|
|
2006-6-26 14:56 |
|
|
stockghost
中级用户
  
积分 215
发帖 105
注册 2007-6-2
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
我也出现过楼主的错误,不过搞好了.
估计是makefile的错误.
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
是错的,应该是:
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
手工在命令行修改输入,该问题就解决了.
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.
|
|
2009-5-10 09:47 |
|
|
stockghost
中级用户
  
积分 215
发帖 105
注册 2007-6-2
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
再编译下去会遇到汇编的错误,要修改源代码
再继续编译,OK!
如果你碰到demo程序编译错误,不用管,你要的lib已经好了.
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.
|
|
2009-5-10 09:50 |
|