You are not logged in.
Hi, i'm new on your forum . Sorry for my bad english because i'm french
I test to compile the lesson1 but it don't work
This is my log of Programmer's Notepad :S
> "make" main.c linking ... grrlibtest.elf main.o: In function `main': c:/devkitPro/examples/wii/grrlibtest/source/main.c:27: undefined reference to `pirate' c:/devkitPro/examples/wii/grrlibtest/source/main.c:27: undefined reference to `pirate' c:/devkitPro/examples/wii/grrlibtest/source/main.c:27: undefined reference to `GRRLIB_LoadTexture' c:/devkitPro/examples/wii/grrlibtest/source/main.c:30: undefined reference to `GRRLIB_Init' c:/devkitPro/examples/wii/grrlibtest/source/main.c:38: undefined reference to `GRRLIB_FillScreen' c:/devkitPro/examples/wii/grrlibtest/source/main.c:41: undefined reference to `GRRLIB_DrawImg' c:/devkitPro/examples/wii/grrlibtest/source/main.c:43: undefined reference to `GRRLIB_Render' collect2: ld returned 1 exit status make[1]: *** [/c/devkitPro/examples/wii/grrlibtest/grrlibtest.elf] Error 1 "make": *** [build] Error 2 > Process Exit Code: 2 > Time Taken: 00:00
Plz help me
My project folder :
main.c
GRRLIB(GRRLIB.c, GRRLIB.h)
gfx(pirate.c, pirate.h)
Thank's for your helping
Offline
Could you paste the 2 includes for: GRRLIB.h and pirate.h, just to check the path.
Just in case paste what you have in your Makefile after LIBS
PS: are you using the SVN version?
En passant, bienvenue sur le forum de GRRLIB.
Offline
Thank's for your quick reply
#include "GRRLIB/GRRLIB.h" #include "gfx/pirate.h"
And the MakeFile
#--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- LIBS := -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- LIBDIRS :=
But where is the tutorial for install the GRRLIB ?
Crayon wrote:
PS: are you using the SVN version?
I don't know lol
Thank's
EDIT: this is my new log lol
> "make" pirate.c linking ... grrlibtest.elf c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/bin/ld.exe: cannot find -lpng collect2: ld returned 1 exit status make[1]: *** [/c/devkitPro/examples/wii/grrlibtest/grrlibtest.elf] Error 1 "make": *** [build] Error 2 > Process Exit Code: 2 > Time Taken: 00:01
Thank's
Last edited by Wr4d (2009-03-31 13:56:44)
Offline
If you downloaded the file from this page http://grrlib.santo.fr/wiki/ there is an template in the folder:
\examples\template\
So the best thing to do is to start your project from that.
The problem you are having now is because the libpng is missing. You need those lines in your Makefile:
GRRLIB := ../../GRRLIB TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source source/gfx $(GRRLIB)/GRRLIB $(GRRLIB)/lib/libpng/pngu DATA := data INCLUDES :=
And
LIBS := -lpng -ljpeg -lz -lwiiuse -lbte -logc -lm
The svn version is available here: http://code.google.com/p/grrlib/
But remember this is the version in development so it could change at any time and sometimes there are bugs.
Offline
Thank's
But its still not working
> "make" linking ... grrlibz.elf c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/bin/ld.exe: cannot find -lpng collect2: ld returned 1 exit status make[1]: *** [/c/devkitPro/examples/wii/grrlibz/grrlibz.elf] Error 1 "make": *** [build] Error 2 > Process Exit Code: 2 > Time Taken: 00:00
How to install the libpng ?
Thank's
Offline
Wr4d wrote:
How to install the libpng ?
Whether you change this path:
#--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- LIBDIRS := $(CURDIR)/$(GRRLIB)
Or you put the your .a in:
C:\devkitPro\libogc\lib\wii
Offline
Oh thank's its work but i have a other problems ^^
c:/devkitPro/examples/wii/grrlibz/source/main.c:26: undefined reference to `GRRLIB_Init' c:/devkitPro/examples/wii/grrlibz/source/main.c:33: undefined reference to `GRRLIB_Render'
The GRRLIB is poorly installed :S thank's
Offline
Did you include this in your main.c:
#include "../../../GRRLIB/GRRLIB/GRRLIB.h" // Choose the good path
In your Makefile you need to add the GRRLIB folder in the sources to compile:
GRRLIB := ../../GRRLIB ... SOURCES := source source/gfx $(GRRLIB)/GRRLIB $(GRRLIB)/lib/libpng/pngu
Offline