This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compiling multi file project


Hi All,

    banging my head, exhausted google, don't know where I make the mistake,
can somebody please tell me the errors of my ways?

Project layout:

projectheader.h
   #ifndef PROJECTHEADER
   #define PROJECTHEADER
   #include <projectwidesystemheaders>
   #include "class1header"
main.cpp
   #include "projectheader"
class1header.h
   #ifndef CLASS1HEADER
   #define CLASS1HEADER
   #include <class1specificsystemheaders>
   #include <tr1/memory>
   typedef shared_ptr<Class1> Class1Ptr;
class1source.cpp
   #include "class1header"
   definitions

A sound and logical layout, as far as I know.

Problem: class1source.cpp fails to compile on it's header with
"error: ‘shared_ptr’ does not name a type"

What is wrong with my layout (because including the projectheader in
class1source compiles) and what is the best thing I can do about it?

Sincerely,

Jan de Haan.

-- 
"Piracy is simply demand where supply does not exist."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]