Mail Archives: djgpp/1997/12/29/01:02:10
Bjoern Appel wrote:
>
> When I want to compile a Allegro-Program, lets say the example, I have
> to type:
>
> gcc ex1.c -o ex1.exe -lalleg <-'
>
> No, I don't have any problems with it, everything works fine. But can
> someone explain me, why I have to use the "lalleg" ? Why is it not
> enough to have the "#include<allegro.h>" in the source-file, compared
> to Pascal's "Uses Crt,..." ?
There is a difference in C between header files and libraries. Header
files contain declarations for library code, while the libraries contain
the actual code. The linker (ld) has no way to know what libraries
contain what code, so you must tell it when you compile your programs.
> And something about RHIDE:
> In RHIDE I have to change "Options -> Libraries" every time I start
> the IDE and want to compile an Allegro-Program. Is there any way to
> save the changes I made ?
You can create a "default" RHIDE configuration by saving your
configuration as 'rhide.gpr' in the same directory as 'rhide.exe'
(usually your DJGPP bin directory). RHIDE will load the settings from
this project file by default each time it starts up. Similarly, you
could select your default Allegro settings, save them in a project file,
and then instruct RHIDE to load this file each time it starts.
hth
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better! This time, you're going all the way down...|
---------------------------------------------------------------------
- Raw text -