Types are incomplete due to include guards
<p>I am trying to get a project to compile, and I am running into a problem with incomplete types. Here is the output from make:</p>

<pre><code>In file included from ../common/ClientCommunication.h:13,
                 from EchoService_stub.h:9,
                 from EchoService_stub.cpp:1:
../common/Naming_stub.h:16: error: field ‘clientCommunication’ has incomplete type
In file included from EchoService_stub.h:9,
                 from EchoService_stub.cpp:1:
../common/ClientCommunication.h:20: error: field ‘serverEndpoint’ has incomplete type
make: *** [EchoService_stub.o] Error 1
</code></pre>

<p>Here are my header files in question:</p>

<p>In Naming_stub.h:</p>

<pre><code>ifndef NAMING_STUB_H__
#define NAMING_STUB_H__

#include &lt;string&gt;
#include &lt;string.h&gt;
#include "Naming.h"

class ClientCommunication;

class Naming_stub : public Naming {

private:
  ClientCommunication clientCommunication;

protected:
  // Protected Methods Here.

public:                                    
  // Public Methods Here.
};
#endif
</code></pre>

<p>In Naming.h</p>

<pre><code>#ifndef NAMING_H__
#define NAMING_H__

#include "Remote.h"
#include "../util/RemoteException.h"

class Naming {
private:
protected:
public:

  virtual Remote* lookup(std::string lookupURL) throw (RemoteException);

  virtual void bind() throw (RemoteException);

  ~Naming();
};

#endif // NAMING_H__      
</code></pre>

<p>Finally, there is the ClientCommunication.h file:</p>

<pre><code>#ifndef CLIENT_COMMUNICATION_H__
#define CLIENT_COMMUNICATION_H__

#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/socket.h&gt;
#include &lt;arpa/inet.h&gt;
#include "../util/RemoteTypes.h"
#include "Naming_stub.h"

struct Endpoint;

class ClientCommunication {
private:
  int socket_fd;
  struct Endpoint serverEndpoint;

protected:

public:
  ClientCommunication(const struct Endpoint&amp; serverEndpoint_in);
  struct Buffer send(struct Buffer&amp; callBuffer);
  ~ClientCommunication();
};

#endif // CLIENT_COMMUNICATION_H__
</code></pre>

<p>Sorry that this is so long, but there is one more header file. The Endpoint struct is declare in RemoteTypes.h, which looks like the following: </p>

<pre><code>#ifndef REMOTE_EXCEPTION_H__
#define REMOTE_EXCEPTION_H__

#include &lt;netinet/in.h&gt;

struct Endpoint {
  int port;
  char* service_id;
  char* server_ip;
  struct sockaddr_in host_name;
};

struct Buffer {
  char* contents;
  int size;
};

#endif
</code></pre>

<p>Thanks!</p>
