swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] Re: Running troubles with a swarm-objc-based application


From: Bill Northcott
Subject: [Swarm-Support] Re: Running troubles with a swarm-objc-based application on macosX
Date: Mon, 3 Mar 2008 10:00:29 +1100

On 03/03/2008, at 1:30 AM, Thomas Louail wrote:

which is the runtime-environnement Protocol object that corresponds to my declaration :

@protocol Double <CREATABLE>

/*!
  @method setDValeur:
  @abstract Set double value
  @param _value the new double value
*/
- setDValeur: (double)_value;

/*!
  @method getDValeur:
  @abstract get double value (D is due to namespace)
  @result the double value
*/
- (double)getDValeur;

/*!
  @method compare:
  @abstract Compare this double with another
  @param aDouble the other double object
@result nul if equal, positive if this double is superior negative otherwise
*/
- (int)compare: aDouble;

@end

in the app code.

I am afraid the back trace did not do much for me.

I would be concerned about calling a protocol Double because double is a reserved word. I know one is capitalised but HFS+ is a case preserving but case insensitive file system. Why not call it TomDouble to eliminate any chance of confusion?

Anyway, during the compile phase, all sources files are compiled with the same gcc, the same rule, and i simplified my makefile to meke it fit to your recommandantions (i just declare the list of object files in the OBJECTS variable, and the dependencies for each of them). The only flag i add is -fnested-functions because there are some in a part of my code (cf. the attached file)<Makefile>

I would not even do that in your makefile. If you really need - fnested-functions, then add it to the CFLAGS and OBJCFLAGS in $ {SWARMHOME}/etc/swarm/Makefile.common. Any mods you make there can be checked by rebuilding the example apps.

Code will always be more portable if you avoid clever tricks. I would put the use of gcc specific language extensions like nested functions in that category. Others would differ on this. If you stick to K&R your code will build anywhere.

Finally. I notice that your code was written for Swarm 2.1 on Linux. The MacOS package is basically 2.2. I know the 2.1 examples had problems on 2.2 but I not into the details on this. You might want to check out the amendments to the Swarm apps from 2.1 to 2.2.

I am in the process of rebuilding Swarm for MacOS 10.5 Leopard. This new version will not run on Tiger because it will use the 4 way fat libffi now included in Leopard for the language bridge support. Also I no longer have a Mac running Tiger.

Please let me know how you get on
Bill


reply via email to

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