You are not logged in.

#1 2010-02-16 23:42:30

StKnight531
Member

[RESOLVED] Undefined Reference

Hi, I've been working on a small testing program so that I can become start to become familiar with the programming libraries, and in my test to use grrlib to genereate a menu, I get this.

main.o: In function `main':
c:/devkitpro/myprog/menutest/source/main.c:15: undefined reference to `GRRLIB_Init'
c:/devkitpro/myprog/menutest/source/main.c:16: undefined reference to `GRRLIB_LoadTexture'
c:/devkitpro/myprog/menutest/source/main.c:17: undefined reference to `GRRLIB_Printf'
collect2: ld returned 1 exit status

My problem now is how do I solve this.  I have barely written any code.  Here it is.

Code:

#include <grrlib.h>

#include <stdlib.h>
#include <math.h>
#include <malloc.h>
#include <fat.h>

//Calls button presses from the Wii Remote as if it was held Horizontally.
//It calls wpad    
#include "horzpad.h"
#include "../gfx/mmshadow.h"

int main()
{
    GRRLIB_Init();
    GRRLIB_texImg *MainFont = GRRLIB_LoadTexture(mmshadow);
    GRRLIB_Printf(200,230,MainFont,0xFFFFFFFF,1,"A Menu");
    

    while (0)
    {
        if (HomePress())
            exit(0);

    }
    return (0);
};

Does anyone have any suggestions?

Offline

 

#2 2010-02-17 00:07:19

Crayon
Bad Mother Fucker

Re: [RESOLVED] Undefined Reference

I think you forgot to include GRRLIB in your Makefile.

Look at the code in the template: http://code.google.com/p/grrlib/source/ … akefile#33

Offline

 

#3 2010-02-17 03:05:58

StKnight531
Member

Re: [RESOLVED] Undefined Reference

Thank you.  That fixed it.  I now feel like an idiot ^_^'

Offline

 

#4 2010-02-17 21:11:42

NoNameNo
Administrator

Re: [RESOLVED] Undefined Reference

anyway this code wont show anything on screen...

Offline

 

#5 2010-02-17 22:20:19

StKnight531
Member

Re: [RESOLVED] Undefined Reference

Really?  Why not?  Am I missing something?

Offline

 

#6 2010-02-17 22:26:33

Crayon
Bad Mother Fucker

Re: [RESOLVED] Undefined Reference

You are not calling GRRLIB_Render().

Look at the GRRLIB template code: http://grrlib.santo.fr/doc/template_2so … ample.html

Offline

 

Board footer

Powered by FluxBB