OpenGL program

Hi all ! Could you please help me ? I am writing an app with OpenGL , and the compiler gives me an error :

 #g++ main.cpp CApp.cpp CFrame.cpp -lGL -lGLU  
 
  In file included  from CFrame.h:14,      
                   from CFrame.cpp:1:
  CApp.h:25: error: ‘frame’ does not name a type






this is my files :

// main.cpp
1
2
3
4
5
6
#include "CApp.h"
int main ( int argc, char *argv[] ) {

	app oApp( argc, argv );
	return oApp.run();
}


// CApp.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef CAPP_H
#define CAPP_H

	#include <iostream>
	#include <stdlib.h>
	using namespace std;
	
	#include <GL/gl.h>
	#include <GL/glx.h>
	#include <GL/glu.h>
	
	#include "CFrame.h"
	
	class app {
	
		int			m_argc;
		char 			**m_argv;
		Window 			m_Window;
		Display 		*m_pDisplay;
		GLXContext 		m_glxContext;

		frame 			m_frame;
		
		void init_visuals();
	
	public : 
	
		app( int, char** );
		int run();
		void stop();
	
	
	};


#endif 


//CApp.cpp

1
2
3
4
5
6
7
8
9
10
11
12
13
#include "CApp.h"
	app::app( int _argc, char **_argv )	{
		m_argc = _argc;
		m_argv = _argv;
		init_visuals();
	}
	
	void app::init_visuals() { /* some initialisation ... */ }

	int app::run() { /* running code */ return 0;}
	
	void app::stop() { /* stopping */ }
	



//CFrame.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CFRAME_H
#define CFRAME_H

	#include <iostream>
	#include <stdlib.h>
	using namespace std;
	
	
	#include <GL/gl.h>
	#include <GL/glx.h>
	#include <GL/glu.h>

	#include "CApp.h"
	class frame {
	
	
		short m_scene_id;

		public :
		
		Window 			m_Window;
		Display 		*m_pDisplay;
		GLXContext 		m_glxContext;	
				
		frame();
		void next_scene();
		void draw_scene();

	};
#endif 




//CFrame.cpp
1
2
3
4
5
#include "CFrame.h"

	frame::frame(  ) { m_scene_id = 0; }
	void frame::next_scene() { /*...*/ }
	void frame::draw_scene() { /* some drawing code */ }





What am I doing wrong ??? In CApp.h I included CFrame.h header but it saying that frame isn't a type !

Thank you all
Aw snap! I solved this , sorry for the stupid question : )
(please mark this as solved then)
Last edited on
Topic archived. No new replies allowed.