swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Porting problems...


From: Derek Farren
Subject: Re: [Swarm-Support] Porting problems...
Date: Thu, 24 Jun 2004 13:26:42 -0400

Thanks Paul, I really appreciate it!!

I finally fixed it! But a new doubt arised in the process...

Why the header file can not find interface declaration for Discrete2d if
space.h is imported?? I had to explicity import space/dicrete2d.h .

Here is the line that calls for discrete2d:
@interface ConsumerDescription: Discrete2d {
  float minPrice, maxPrice;
}

Thanks again!

Derek Farren
MSC student
Universidad Adolfo Ibañez
Chile


----- Original Message ----- 
From: "Paul Johnson" <address@hidden>
To: <address@hidden>
Sent: Wednesday, June 23, 2004 5:29 PM
Subject: Re: [Swarm-Support] Porting problems...


> Most importantly, I'd suggest you get some current application that does
> work and then compare the usages between that one and your old one.
>
> Also, you have verified that your version of Swarm compiles/runs for
> some of the swarmapps that are known to run, right?
>
> Concerning:
>  > ModelSwarm.m:99: warning: `ConsumerDescription' does not respond to
>  > `setSizeX:Y:'
>
> You get this kind of message when the compiler can't figure what type of
> object you are sending the message to (if you just declared it as an id,
> for example) or if the method is not declared in a header file.
>
> You can check the header files for yourself this way
> $ cd /usr/include/swarm
> $ grep setSize *
> space.h:+ create: (id <Zone>)aZone setSizeX: (unsigned)x Y: (unsigned)y;
> space.h:- setSizeX: (unsigned)x Y: (unsigned)y;
> space.h:+ create: (id <Zone>)aZone setSizeX: (unsigned)x Y: (unsigned)y
> setDiffusionConstant: (double)d setEvaporationRate: (double)e;
>
> This shows that space objects do have the method, but your code is not
> giving the compiler enough information on where to find it.  Possibly
> you don't have the right header file included.  That's one of the big
> changes in Swarm after version 1.0.
>
> If you try your best and can't get it to go, send me a link to your
> tar.gz file and I'll allocate 30 minutes of concentration to it.
> Usually, the changes are not terrible, but you just have to carefully
> check each compiler warning, one by one.
>
> pj
>
> Derek Farren wrote:
> > Hi.
> >
> > I am upgrading Pietro Terna´s abcde Swarm v.1.0.5 simulation to v.2.2. I
> > followed all steps in the reference guide, but still get the following
> > errors. This errors are taken from the shell´s compilation output,
> > everithing else seems to be ok. The program complete its compilation,
but
> > the .exe doesn´t run.
> >
> >
> > ERROR 1
>
> --------------------------------------------------------------------------
--
> > ------------------------
> > main.m
> > main.m: In function `main':
> > main.m:24: warning: passing arg 2 of `_initSwarm_' from incompatible
pointer
> > type
>
> --------------------------------------------------------------------------
--
> > ------------------------
> > I really don´t know what´s wrong in this one, line 24 reads
initSwarm(argc,
> > argv);  ... if that helps....
> >
> >
> > ERROR 2
>
> --------------------------------------------------------------------------
--
> > -----------------------
> > ModelSwarm.m
> > ModelSwarm.m: In function `-[ModelSwarm buildObjects]':
> > ModelSwarm.m:99: warning: `ConsumerDescription' does not respond to
> > `setSizeX:Y:'
>
> --------------------------------------------------------------------------
--
> > ----------------------
> > Seems to me like the method setSizeX:Y: isn´t defined anymore on any of
the
> > classes imported from modelswarm.h.... should I create the method, or it
> > come on a diferent library class?? or comes now with a diferent name??
> >
> >
> > ERROR 3
>
> --------------------------------------------------------------------------
--
> > ----------------------
> > ConsumerDescription.m
> > ConsumerDescription.m: In function `-[ConsumerDescription clear]':
> > ConsumerDescription.m:17: warning: `ConsumerDescription' does not
respond to
> > `fillWithValue:'
> > ConsumerDescription.m: In function `-[ConsumerDescription
> > addAConsumer:buyingLevel:offerPrice:]':
> > ConsumerDescription.m:28: warning: `ConsumerDescription' does not
respond to
> > `putValue:atX:Y:'
> > ConsumerDescription.m:29: warning: `ConsumerDescription' does not
respond to
> > `putValue:atX:Y:'
> > ConsumerDescription.m: In function `-[ConsumerDescription
> >
addPricesToConsumer:buyingLevel:offerPrice:offerMinPrice:offerMaxPrice:]':
> > ConsumerDescription.m:49: warning: `ConsumerDescription' does not
respond to
> > `putValue:atX:Y:'
> > ConsumerDescription.m:53: warning: `ConsumerDescription' does not
respond to
> > `putValue:atX:Y:'
> > ConsumerDescription.m:54: warning: `ConsumerDescription' does not
respond to
> > `putValue:atX:Y:'
>
> --------------------------------------------------------------------------
--
> > ------------------------
> > Same here as error 2, but with methods fillWithValue and putValue:atX:Y:
.
> >
> > Any help would be highly appreciated!!
> >
> > Thanks in advance...
> >
> > Derek
> >
> >
> > _______________________________________________
> > Support mailing list
> > address@hidden
> > http://www.swarm.org/mailman/listinfo/support
>
>
> -- 
> Paul E. Johnson                       email: address@hidden
> Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
> 1541 Lilac Lane, Rm 504
> University of Kansas                  Office: (785) 864-9086
> Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support
>




reply via email to

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