Sign in to follow this  

Compiller error - Undeclared Identifier

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I created a separate class to handle the graphics functions of the program, but it keeps telling me that some of the variables are undefined. The variables are defined private, then set =NULL in the class'es constructor.
#ifndef GFXAPI_H
#define GFXAPI_H

#include <d3dx9.h>
#include "CCamera.h"

class gfxApi
{
public:
	gfxApi();
	~gfxApi();

	// ----- init -----
	bool init(HWND hWnd, bool fullscreen);
	void shutDown();

	// ----- loop -----
	void render();

private:

	LPDIRECT3D9			d3dApp;
	LPDIRECT3DDEVICE9	d3dRender;

	LPD3DXMATRIXSTACK	MatrixStack;
	D3DXMATRIXA16		view;

	CCamera	camera;
};

#endif	//GFXAPI_H

Here are the error messages that it gives me, in case it helps any:
Compiling...
core.cpp
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(113) : error C2146: syntax error : missing ';' before identifier 'MMVERSION'
c:\program files\microsoft visual studio\vc98\include\mmsystem.h(113) : fatal error C1004: unexpected end of file found
gfxApi.cpp
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(30) : error C2065: 'd3dApp' : undeclared identifier
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(30) : error C2440: '=' : cannot convert from 'struct IDirect3D9 *' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(41) : error C2227: left of '->GetAdapterDisplayMode' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(48) : error C2227: left of '->GetDeviceCaps' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(81) : error C2227: left of '->CreateDevice' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(81) : error C2065: 'd3dRender' : undeclared identifier
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(97) : error C2227: left of '->SetRenderState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(100) : error C2227: left of '->SetRenderState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(101) : error C2227: left of '->SetRenderState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(102) : error C2227: left of '->SetRenderState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(103) : error C2227: left of '->SetRenderState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(109) : error C2227: left of '->SetSamplerState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(110) : error C2227: left of '->SetSamplerState' must point to class/struct/union
e:\organized\programming\bcit\comp2442\out\framework\gfxapi.cpp(119) : error C2065: 'MatrixStack' : undeclared identifier
Skipping... (no relevant changes detected)
main.cpp
Error executing cl.exe.
Thanks for taking the time to look

Share this post


Link to post
Share on other sites

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this