You are not logged in.

#1 2009-03-30 23:27:03

Wr4d
Member

Problem to compile

Hi, i'm new on your forum . Sorry for my bad english because i'm french smile

I test to compile the lesson1 but it don't work

This is my log of Programmer's Notepad :S

Code:

> "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 big_smile

My project folder :

main.c
GRRLIB(GRRLIB.c, GRRLIB.h)
gfx(pirate.c, pirate.h)

Thank's for your helping

Offline

 

#2 2009-03-31 00:49:27

Crayon
Bad Mother Fucker

Re: Problem to compile

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. wink

Offline

 

#3 2009-03-31 13:20:38

Wr4d
Member

Re: Problem to compile

Thank's for your quick reply big_smile

Code:

#include "GRRLIB/GRRLIB.h"
#include "gfx/pirate.h"

And the MakeFile

Code:

#---------------------------------------------------------------------------------
# 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

Code:

> "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

 

#4 2009-03-31 16:26:28

Crayon
Bad Mother Fucker

Re: Problem to compile

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:

Code:

GRRLIB        :=    ../../GRRLIB
TARGET        :=    $(notdir $(CURDIR))
BUILD        :=    build
SOURCES        :=    source source/gfx $(GRRLIB)/GRRLIB $(GRRLIB)/lib/libpng/pngu
DATA        :=    data  
INCLUDES    :=

And

Code:

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

 

#5 2009-03-31 18:05:29

Wr4d
Member

Re: Problem to compile

Thank's
But its still not working

Code:

> "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

 

#6 2009-03-31 20:14:26

Crayon
Bad Mother Fucker

Re: Problem to compile

Wr4d wrote:

How to install the libpng ?

Whether you change this path:

Code:

#---------------------------------------------------------------------------------
# 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

 

#7 2009-04-01 16:55:22

Wr4d
Member

Re: Problem to compile

Oh thank's its work but i have a other problems ^^

Code:

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

 

#8 2009-04-01 19:34:12

Crayon
Bad Mother Fucker

Re: Problem to compile

Did you include this in your main.c:

Code:

#include "../../../GRRLIB/GRRLIB/GRRLIB.h" // Choose the good path

In your Makefile you need to add the GRRLIB folder in the sources to compile:

Code:

GRRLIB        :=    ../../GRRLIB
...
SOURCES        :=    source source/gfx $(GRRLIB)/GRRLIB $(GRRLIB)/lib/libpng/pngu

Offline

 

Board footer

Powered by FluxBB