Setting HGE with Dev Cpp
  • TimidonTimidon June 2004
    :?: Anybody been successful in setting up HGE with Dev Cpp using mingw32?

    If so please give me a nice step by step instruction...

    (I am using Dev Cpp 5) :shock:
  • DaiShivaDaiShiva June 2004
    I didnt think there was any trick to it. Just add the libraries and header files to the project and compile.

    Havent used dev-cpp to make my project in a while (couple months) but it can be done
  • haafhaaf June 2004
    The answer is here:
    http://www.relishgames.com/forum/viewtopic.php?t=114

    If you use Dev-C++ please upgrade to the latest
    MinGW (gcc 3.2.3) or use hgehelp.a from this archive:
    http://hge.relishgames.com/files/hge14gcc320.zip
  • TimidonTimidon June 2004
    Well I have to be doing something wrong, (good chance of it)..

    Got the currernt minggw.

    I have copied the libraries and goodies into the the directory, so I make a new Project (Tab) > New Windows App

    I goto the Project (Tab) > Project Options > Paramateries and add the HGE.a to the Linker (I had to do this with Allegro, so I figure it may be the same here).

    I tried out the base tut, Tutorial 01 - Minimal HGE application - Tutorial base code should look like this
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    #include <windows.h>
    #include <hge.h>
     
    HGE *hge = 0;
     
    bool FrameFunc()
    {
    if (hge->Key_GetState(HGEK_ESCAPE)) return true;
    return false;
    }
     
    int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
    {
    hge = hgeCreate();
     
    hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
    hge->System_SetState(HGE_WINDOWED, true);
    hge->System_SetState(HGE_USESOUND, false);
    hge->System_SetState(HGE_TITLE, "HGE Tutorial 01 - Minimal HGE application");
    if(hge->System_Initiate())
    {
    hge->System_Start();
    }
    else
    {
    MessageBox(NULL, hge->System_GetErrorMessage(), "Error",
    MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
    }
    hge->System_Shutdown();
    hge->Release();
     
    return 0;
    }


    When I compile I get allot of Errors:


    C:\Dev-Cpp\Templates\missioncontrol.cpp
    [Warning] In function `bool FrameFunc()':

    8 C:\Dev-Cpp\Templates\missioncontrol.cpp
    no matching function for call to `HGE::

    C:\DEV-CPP\include\hge.h
    [Warning] In function `int WinMain(HINSTANCE__*, HINSTANCE__*,:

    284 C:\DEV-CPP\include\hge.h
    too few arguments to function `HGE*

    14 C:\Dev-Cpp\Templates\missioncontrol.cpp
    at this point in file



    This is the point I am stuck at... So if the DevCpp guys have run across this type of error before. I am more than likely doing SOMETHING wrong that I do not realize what it is.
  • haafhaaf June 2004
    In 1.4 I've forget to update tutorial 01 in the documentation. All other tutorials should work fine. You could also use the source code from the folder "tutorials" for reference.

    In recent HGE versions you should provide an argument for hgeCreate:
    1
      hge = hgeCreate(HGE_VERSION);

    Also Key_GetState was renamed to Input_GetKeyState (See "Version history" and "Upgrading from older HGE" documentation sections):
    1
     hge->Input_GetKeyState(HGEK_ESCAPE);
  • TimidonTimidon June 2004
    Okay Well That did it. The Test Ap works Thanks. Used the code in the Tutorial Folder. Now I can go play with it. :wink:

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion

Who's Online (0)