1
4

1 に答える 1

1

Ok。実際の問題はShape.cpp、もちろん含まれている言及されていないファイルと、ガードの前にShape.h移動することが問題を修正していたという事実に関連していました。#include "GLProject.h"ガード内の include ディレクティブを使用したフロー:

Shape.h (def guard)
     GProject.h (def guard) 
          ...(MainWindow.h and ShaderProgram.h)...//not interesting

          Shape.h (omit, because of guard)

          Scene.h
                GProject.h (omit, because of guard)
          back to Scene.h (def guard) ERROR

外部のディレクティブを使用している間:

Shape.h
     GProject.h (def guard)
          ...(MainWindow.h and ShaderProgram.h)...//not interesting

          Shape.h
                GProject.h (omit, cause of guard)
          back to Shape.h (now def guard and class)

          Scene.h
                GProject.h (omit, because of guard)
          back to Scene.h (def guard) No error - Shape defined
于 2014-07-18T23:07:38.827 に答える