• Advertisement
Sign in to follow this  

One last linker error,, halp

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

RAAAWR I've been banging on my desk for half an hour trying to figure this one out. I'm trying to compile this simple DirectX program in VS08, but the compiler is complaining that the MainLoop function inside loop.cpp has no idea what the HandleMessage function is (which is defined inside main.cpp and declared in global.h). loop.cpp:
#include "global.h"

// only the HandleMessages function is listed here for brevity

bool HandleMessages();

// main loop
void MainLoop(){

       // Input();
       // Logic();
       // Render();

#include "global.h"

bool HandleMessage(){

   static MSG msg;
   if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){
      if(msg.message == WM_QUIT) return FALSE;
   return TRUE;
// header files
#include <windows.h>
#include <windowsx.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <iostream>
#include "gamewindow.h"

// libraries
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")

// prototypes for
// WinMain.cpp
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void DisplayWindow(GAMEWINDOW* gw, HINSTANCE hInstance, int nCmdShow);
bool HandleMessages();

// Loop.cpp
void MainLoop();

// Direct3D.cpp
void InitDirect3D(GAMEWINDOW* gw);
void CloseDirect3D();
What is the problem here?

Share this post

Link to post
Share on other sites
oh gawd how did i not see that. thank you good sir you humble me with your keen eyesight

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement