swarm-support
[Top][All Lists]
Advanced

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

Re: Circular ".h" files


From: donalson
Subject: Re: Circular ".h" files
Date: Sun, 11 Jul 1999 18:07:44 -0700

Norberto,

   I thought that I remembered this.  Unfortunatly, I use import.  It seems that
at least in the Cygnus
version, it doesn't work.  I also know that another grad student here used Swarm
for a while on
our sparc stations and had the same problem.  One fix he came up with was to put
the .h
files that needed references in the implementation files instead of the .h
files.  This only seems to occur with user defined objects as opposed to swarm
provided objects.

The link did remind me that ObjC might take the preprocessor dir's that I put in
my previous
email, I gave that a try.  At least for a quick hack, it didn't work.  In the
mean time, although I still have
a multiple interface def warning, my error turned out to be far less ethereal in
nature and I fixed that.

Thanks for the ideas and the link.

Cheers,

   D3

Norberto Eiji Nawa wrote:

> Hello Doug,
>
> I found this in the Apple's Objective C documentation
> (http://developer.apple.com/techpubs/macosxserver/ObjectiveC/index.html):
>
> "PREPROCESSOR DIRECTIVES
>
>   The preprocessor understands these new notations:
>
>
> Notation and Definition
>
>   #import
>
>
>      Imports a header file. This directive is identical to #include,
> except that it won't include the same file more than once."
>
> So using "#import <myheader.h>" instead of "#include <myheader.h>"
> should avoid circular references.
>
> Hope it is a useful piece of information.
>
> Eiji
>
> donalson> In C++ there is a way to avoid the problems with circular ".h" file
> donalson> references by using
> donalson> #ifndef LISTMEMBER_H
> donalson> #define LISTMEMBER_H
> donalson> //contents of .h file here
> donalson> #endif
> donalson> Is there any similar method in ObjC?
> donalson> Cheers,
> donalson>    D3
>
>                   ==================================
>    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.

--
*********************************************************************
* 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]