Mail Archives: djgpp/2000/03/27/13:23:53
Tony Kwan <kwantk AT idirect DOT com> wrote:
> I am trying to make my first multi-file project with RHIDE but the compiler
> is giving me errors which I don't know how to fix. Essentially I am
> following a tutorial I got from the net on "C Libraries and Makefiles" from
> DevCentral: (abbreviated)
[I wonder how you thought you'ld learn RHIDE from a tutorial dealing
with Makefiles... it's the opposite of using Makefiles, essentially.]
Anyway, your examples contains two minor faults, and a fatal usage
error of RHIDE:
> int rand() {...}
Don't name your functions like ones already defined in the Standard C
Library, if you can help it.
> void main()
main() *has* to return an int. Everything else is an error.
> Error Message:
> ----------------------------------
> Error: util.o: In function `rand':
> util.c(6) Error: multiple definition of `rand'
> o:util.c(6) Error: first defined here
You've added the file 'util.o' to the RHIDE project file list. That's
your actual error. Only the .c files should go there.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -