You are not logged in.
I copied the "day1" sample into the helloworld subdirectory of my devkitpro development directory where I had compiled the devkitpro helloworld.c sample before. I am using programmers notepad. When I select "make" I get the following linker errrors:
linking ... helloworld.elf
day1.o: In function `main':
d:/devkit-dev/helloworld/source/day1.c:26: undefined reference to `GRRLIB_InitVideo'
d:/devkit-dev/helloworld/source/day1.c:27: undefined reference to `GRRLIB_Start'
d:/devkit-dev/helloworld/source/day1.c:33: undefined reference to `GRRLIB_FillScreen'
d:/devkit-dev/helloworld/source/day1.c:35: undefined reference to `GRRLIB_Render'
collect2: ld returned 1 exit status
make[1]: *** [/d/devkit-dev/helloworld/helloworld.elf] Error 1
"make": *** [build] Error 2
> Process Exit Code: 2
> Time Taken: 00:01
I copied libpng.a into the devkitpro/libogc/lib/wii/ directory. Then I copied the directory GRRLIB with the files GRRLIB.C and GRRLIB.H into the devkitpro/libogc/include directory and then the libpng directory into this as well.
What do I have to do to get rid of these linker errors?
Georg
Offline
You need to put GRRLIB into your project directory as it is source and needs to be built.
Offline
Thank you very much!
I copied the GRRLIB.C file into my source directory, copied the GRRLIB directory into my source directory so the demo finds the GRRLIB.h file (#include "GRRLIB/GRRLIB.h") and copied the libpng directory into my helloworld directory.
Then it compiled successfully.
GRRLIB feature request: add these instructions to the GRRLIB readme file.
Offline
I am stuck again. I try to compile the day7 sample and get the following linker errrors:
linking ... helloworld.elf
GRRLIB.o: In function `GRRLIB_LoadTexture':
d:/devkit-dev/helloworld/source/GRRLIB.c:65: undefined reference to `PNGU_SelectImageFromBuffer'
d:/devkit-dev/helloworld/source/GRRLIB.c:66: undefined reference to `PNGU_GetImageProperties'
d:/devkit-dev/helloworld/source/GRRLIB.c:68: undefined reference to `PNGU_DecodeTo4x4RGBA8'
d:/devkit-dev/helloworld/source/GRRLIB.c:69: undefined reference to `PNGU_ReleaseImageContext'
collect2: ld returned 1 exit status
make[1]: *** [/d/devkit-dev/helloworld/helloworld.elf] Error 1
"make": *** [build] Error 2
> Process Exit Code: 2
> Time Taken: 00:02
I copied the file GRRLIB_font1.c into my source directory.
What do I have to do to get rid of these linker errors?
Georg
Offline
I finally got it to run.
Copied the directories GFX, GRRLIB and pnglib into the source directory. Copied the library libpng.a into the \devkitPro\libogc\lib\wii directory. Replaced my old makefile in my helloworld directory with the makefile within the GRRLIB package. Copied GRRLIB.C and GRRLIB_font1.C into the source directory.
Then Make finally compiled day7.
I think this information should go into the readme file.
Last edited by georgp24 (2008-11-17 22:33:52)
Offline