Here is my main.h
Code:
#ifndef main_h
#define main_h

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>

#include <string>
#include <d3d9.h> 
#include <d3dx9.h> 

#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "Winmm.lib")

#define SCREEN_WIDTH 1440
#define SCREEN_HEIGHT 900

#define WNDCLASSNAME L"PoweredByShezzy"

#include "CApp.h"
#include "CCamera.h"

extern CApplication g_Application;


LRESULT CALLBACK WindowEventProc(HWND,UINT,WPARAM,LPARAM);
#endif
When I have added the "extern CApplication g_Application;" line I am getting errors:
Code:
1>  cApp.cpp
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C2146: syntax error : missing ';' before identifier 'g_Application'
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  cCamera.cpp
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C2146: syntax error : missing ';' before identifier 'g_Application'
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\tomek\projects\dxtest\dxtest\main.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
What could be the problem?