Archived

This topic is now archived and is closed to further replies.

Error when creating an instance of struct.

This topic is 6362 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

Hello again all...
typedef struct _GApp {
	LPDIRECTDRAW lpDD;                // A DirectDraw object
// 	LPDIRECT3DRM pD3DRM;              // A Direct3D RM object
	LPDIRECTDRAWSURFACE lpDDSPrimary; // DirectDraw primary surface
	LPDIRECTDRAWSURFACE lpDDSBack;    // DirectDraw back surface
	LPDIRECTDRAWPALETTE lpDDPal;      // Palette for primary surface
	LPDIRECTDRAWCLIPPER lpClipper;    // Clipper for windowed mode object in our scene

	BOOL bFullScreen;                // Are we in full-screen mode?
	BOOL bAnimating;                 // Has our animating begun?
	HWND ddWnd;                      // HWND of the DDraw window
} GApp, *LPGApp;

extern GApp gapp;
 
I fixed the problem I was having before now, here''s the error I''m getting: gamemain.obj : error LNK2001: unresolved external symbol "struct _GApp gapp" (?gapp@@3U_GApp@@A) main.obj : error LNK2001: unresolved external symbol "struct _GApp gapp" (?gapp@@3U_GApp@@A) Debug/theknightslair.exe : fatal error LNK1120: 1 unresolved externals Can anyone see what I''m doing wrong?? BTW: this struct is in a header file and I include the header where needed. Any help will be good.. Cyberdrek Headhunter Soft DLC Multimedia

Share this post


Link to post
Share on other sites
Actually, I''m creating an instance of the struct in my main file as follow:

GApp gapp;

I call it as a global so basicly, it should work...


Cyberdrek
Headhunter Soft
DLC Multimedia

Share this post


Link to post
Share on other sites