Welcome! Log In Create A New Profile

Advanced

Linktime error using GRRLIB and related files

Posted by alainvey 
Linktime error using GRRLIB and related files
June 07, 2009 01:25AM
Yo guys,

I warn you: I began C++ coding on Thursday evening and did not do any on Friday, thus this is my second evening.

I've been learning from teknecal's tuts on codemii, and am trying to splice some of that with the recent tic-tac-toe coding-assistance release.

All I want to do at this stage is display a background png and have a cursor png follow the IR. I believe my code is sound, so far.

I've been having trouble getting the linking to work: after much fiddling, I've got most things linking, but now I'm getting the error:

c:/devkitPro/examples/wii/experiment2/source/pngu.c:1100: undefined reference to `png_get_io_ptr'

Can anyone help me here? Perhaps a guide to what my dir structure should be, as well as the contents of the makefile bit for GRRLIB.

I would be eternally thankful.
Re: Linktime error using GRRLIB and related files
June 07, 2009 03:19AM
As far as directory structure, here's how I do mine:
root dir (where makefile is)
 -- source (where main app/game source files go)
 ---- gfx (where all images go)
 ---- GRRLIB
 -------- fonts (folder)
 -------- GRRLIB.c
 -------- GRRLIB.h
 ---- libpng
 -------- pngu (folder)
 -------- png.h
 -------- pngconf.h
 -- lib (library files)
 ---- libpng.a

As far as your error goes, can you post the part of your code that uses that reference? I would also look at the code in the pngu.c file on line 1100, make sure you don't have anything misspelled.
Re: Linktime error using GRRLIB and related files
June 07, 2009 04:10AM
Thanks for the response. I've fixed it now: libs listed in incorrect order in makefile -_-. Put libpng closer to the front and it works now.

I've managed to display a background with a movable cursor on it. I might submit it and call it "Stroke Derrida".
Re: Linktime error using GRRLIB and related files
June 07, 2009 05:23AM
Glad to see you fixed the problem!
Sorry, only registered users may post in this forum.

Click here to login