swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two -getX()'s?


From: donalson
Subject: Two -getX()'s?
Date: Fri, 03 Sep 1999 15:48:43 -0700

Marcus,

   I am having some compile trouble.  I have an object "mussel" (the
animals that grow in the intertidal zone) that has two procedures, -
(double) getX() and - (double) getY that return the X and Y coordinates
of the individual.  (I am implementing a continuous space model.)  The
problem is that the compiler/linker seems to be getting then confused
with -(int) getX() and - (int) getY() from gui.h.  Shouldn't it be able
to differentiate between procedures from different objects?  I can
change my procedure to something like getMusselX but I don't see why
there should be a problem this way.

gcc -c -g -O2 -Wall -Wno-import -Wno-protocol   -DAPPNAME=mussel   -DDLL
-I/Swarm-2.0/include Mussel.m
Mussel.m: In function `-[Mussel initializeMusselNeighbors]':
Mussel.m:26: warning: multiple declarations for method `getX'
\Swarm-2.0\include\gui.h:106: warning: using `-(int)getX'
Mussel.h:35: warning: also found `-(double)getX'
Mussel.m:26: warning: multiple declarations for method `getX'
\Swarm-2.0\include\gui.h:106: warning: using `-(int)getX'
Mussel.h:35: warning: also found `-(double)getX'
Mussel.m:26: warning: multiple declarations for method `getY'
\Swarm-2.0\include\gui.h:109: warning: using `-(int)getY'
Mussel.h:36: warning: also found `-(double)getY'
Mussel.m:26: warning: multiple declarations for method `getY'
\Swarm-2.0\include\gui.h:109: warning: using `-(int)getY'
Mussel.h:36: warning: also found `-(double)getY'

Cheers,

   D3
*********************************************************************
* Doug Donalson                 Office: (805) 893-2962
* Ecology, Evolution,           Home:   (805) 961-4447
* and Marine Biology            email address@hidden
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*
*   The most exciting phrase to hear in science, the one that
*   heralds new discoveries, is not "EUREKA" (I have found it) but
*   "That's funny ...?"
*
*       Isaac Asimov
*
*********************************************************************



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]