Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   need some help with and error i cant figure out (http://www.go4expert.com/forums/help-error-i-figure-t19335/)

cpulocksmith 8Sep2009 00:18

need some help with and error i cant figure out
k, well, i downloaded "hge" a 2d graphics engine in c++. it comes with a small tut witch consists of the source code. for tut 1 the code is.


** Haaf's Game Engine 1.8
** Copyright (C) 2003-2007, Relish Games
** hge.relishgames.com
** hge_tut01 - Minimal HGE application

#include "..\..\include\hge.h"

HGE *hge = 0;

// This function will be called by HGE once per frame.
// Put your game loop code here. In this example we
// just check whether ESC key has been pressed.
bool FrameFunc()
        // By returning "true" we tell HGE
        // to stop running the application.
        if (hge->Input_GetKeyState(HGEK_ESCAPE)) return true;

        // Continue execution
        return false;

        // Here we use global pointer to HGE interface.
        // Instead you may use hgeCreate() every
        // time you need access to HGE. Just be sure to
        // have a corresponding hge->Release()
        // for each call to hgeCreate()
        hge = hgeCreate(HGE_VERSION);

        // Set our frame function
        hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);

        // Set the window title
        hge->System_SetState(HGE_TITLE, "HGE Tutorial 01 - Minimal HGE application");
        // Run in windowed mode
        // Default window size is 800x600
        hge->System_SetState(HGE_WINDOWED, true);

        // Don't use BASS for sound
        hge->System_SetState(HGE_USESOUND, false);

        // Tries to initiate HGE with the states set.
        // If something goes wrong, "false" is returned
        // and more specific description of what have
        // happened can be read with System_GetErrorMessage().
                // Starts running FrameFunc().
                // Note that the execution "stops" here
                // until "true" is returned from FrameFunc().
                // If HGE initialization failed show error message
                MessageBox(NULL, hge->System_GetErrorMessage(), "Error", MB_OK | MB_ICONERROR | MB_APPLMODAL);

        // Now ESC has been pressed or the user
        // has closed the window by other means.

        // Restore video mode and free
        // all allocated resources

        // Release the HGE interface.
        // If there are no more references,
        // the HGE object will be deleted.

        return 0;

when i compile it i get the error " [Linker error] undefined reference to `hgeCreate@4' "
i have looked of what this means and all i have found on forums are people telling other people that it is a linker error. and well. duh. but no one will tell me how to fix it.

xpi0t0s 8Sep2009 01:03

Re: need some help with and error i cant figure out
What commands do you use to compile and link the program?

All times are GMT +5.5. The time now is 00:38.