You are not logged in.
Using this thread I partially fixed the problem, but now I got this error:
make[1]: *** Er is geen regel om doel 'GRRLIB.o' te maken, nodig voor '/home/chris/homebrew-projects/brick-wii/brick-wii.elf'. Gestopt.
make: *** [build] Fout 2
Translated (since my make is Dutch): there is no rule to make target 'GRRLIB.o', needed for /home/chris/homebrew-projects/brick-wii/brick-wii.elf'. Stopped.
make: *** [build] Error 2
What is the problem and
Offline
Hi, could you paste your Makefile here, use the code tag.
Offline
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
GRRLIB := $(DEVKITPRO)/libogc/include $(DEVKITPRO)/libogc/lib/libpng/pngu
TARGET := $(notdir $(CURDIR))
BUILD := build
SOURCES := source source/gfx $(GRRLIB)
DATA := data
INCLUDES :=
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lpng -ljpeg -lwiiuse -lbte -logc -lm
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(GRRLIB)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
#---------------------------------------------------------------------------------
run:
wiiload $(TARGET).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------I've placed everything in my libogc folder, so I'm sorry for my not-standard installation :')
Offline
Try this, since your are not putting libpng inside the GRRLIB folder:
TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source source/gfx $(DEVKITPRO)/libogc/include $(DEVKITPRO)/libogc/lib/libpng/pngu DATA := data INCLUDES :=
PS: It's never a good thing to put a .c file inside the include folder.
Offline
Crayon wrote:
Try this, since your are not putting libpng inside the GRRLIB folder:
Code:
TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source source/gfx $(DEVKITPRO)/libogc/include $(DEVKITPRO)/libogc/lib/libpng/pngu DATA := data INCLUDES :=PS: It's never a good thing to put a .c file inside the include folder.
Still the same error.
Offline
Could paste the code where you do:
#include "GRRLIB.h"
Offline
Crayon wrote:
Could paste the code where you do:
Code:
#include "GRRLIB.h"
I don't understand. Here is my a.c file.
#include <stdio.h>
#include <stdlib.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include "GRRLIB.h"
#include <color.h>
// Include all GFXes
#include "gfx/grrlib.h"
static void *xfb = NULL;
static GXRModeObj *rmode = NULL;
//---------------------------------------------------------------------------------
int main(int argc, char **argv) {
//---------------------------------------------------------------------------------
// Initialise the video system
VIDEO_Init();
// This function initialises the attached controllers
WPAD_Init();
// Obtain the preferred video mode from the system
// This will correspond to the settings in the Wii menu
rmode = VIDEO_GetPreferredMode(NULL);
// Allocate memory for the display in the uncached region
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
// Initialise the console, required for printf
console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
// Set up the video registers with the chosen mode
VIDEO_Configure(rmode);
// Tell the video hardware where our display memory is
VIDEO_SetNextFramebuffer(xfb);
// Make the display visible
VIDEO_SetBlack(FALSE);
// Flush the video register changes to the hardware
VIDEO_Flush();
// Wait for Video setup to complete
VIDEO_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
// Init GRRLIB
GRRLIB_Init();
// Everything set up, lets run!
// first of all, show the logo of the awesome GRRLIB at whitescreen
GRRLIB_FillScreen(COLOR_white); // white rockz
GRRLIB_texImg grrsplash;
grrsplash = GRRLIB_LoadTexture(grrlib);
GRRLIB_DrawImg(0,0,grrsplash,0,0,0,COLOR_white);
GRRLIB_Render();
sleep(3);
return 0;
}Last edited by Crayon (2009-06-05 23:18:43)
Offline
Try to call your graphic another name than grrlib.h:
#include "gfx/grrlib.h"
Offline
Crayon wrote:
Try to call your graphic another name than grrlib.h:
Code:
#include "gfx/grrlib.h"
M'kay... Did it, but still got the same error ![]()
Offline
field33P wrote:
M'kay... Did it, but still got the same error
Did you clean the folder first? In devkitPro, Tools/clean or Alt+2. Just in case some garbage were left!
If it's possible could you provide us your code, so we could try to compile it.
Offline
Crayon wrote:
field33P wrote:
M'kay... Did it, but still got the same error
Did you clean the folder first? In devkitPro, Tools/clean or Alt+2. Just in case some garbage were left!
If it's possible could you provide us your code, so we could try to compile it.
Nope, still teh same error. I'm running under Ubuntu.
Get mii source
Offline
Wow I just noticed that in your code you are using VIDEO_* functions. If you are using GRRLIB don't use that. You need to declare "Mtx GXmodelView2D;" too. You know there is a template to start a GRRLIB project. It's in GRRLib4.0.0.rar\grrlib\examples\template\source. And it looks like this:
#include "../../../GRRLIB/GRRLIB/GRRLIB.h"
#include <stdlib.h>
#include <wiiuse/wpad.h>
Mtx GXmodelView2D;
int main() {
u32 wpaddown;
GRRLIB_Init();
WPAD_Init();
while(1) {
WPAD_ScanPads();
wpaddown = WPAD_ButtonsDown(0);
GRRLIB_Render();
if(wpaddown & WPAD_BUTTON_HOME) {
exit(0);
}
}
GRRLIB_Exit(); // Be a good boy, clear the memory allocated by GRRLIB
return 0;
}PS: If you don't have a while loop in your code it's going to draw your thing on the screen for a couple of milliseconds and exit the program.
Offline
Crayon wrote:
Wow I just noticed that in your code you are using VIDEO_* functions. If you are using GRRLIB don't use that. You need to declare "Mtx GXmodelView2D;" too. You know there is a template to start a GRRLIB project. It's in GRRLib4.0.0.rar\grrlib\examples\template\source. And it looks like this:
Code:
#include "../../../GRRLIB/GRRLIB/GRRLIB.h" #include <stdlib.h> #include <wiiuse/wpad.h> Mtx GXmodelView2D; int main() { u32 wpaddown; GRRLIB_Init(); WPAD_Init(); while(1) { WPAD_ScanPads(); wpaddown = WPAD_ButtonsDown(0); GRRLIB_Render(); if(wpaddown & WPAD_BUTTON_HOME) { exit(0); } } GRRLIB_Exit(); // Be a good boy, clear the memory allocated by GRRLIB return 0; }PS: If you don't have a while loop in your code it's going to draw your thing on the screen for a couple of milliseconds and exit the program.
But still got the same error :')
My a.c:
#include <stdio.h>
#include <stdlib.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include "GRRLIB.h"
#include <color.h>
// Include all GFXes
#include "gfx/grrlibsplash.h"
Mtx GXmodelView2D;
//---------------------------------------------------------------------------------
int main(int argc, char **argv) {
//---------------------------------------------------------------------------------
int grrsplash_shown;
// This function initialises the attached controllers
WPAD_Init();
// Init GRRLIB
GRRLIB_Init();
// Everything set up, lets run!
while(1) {
if(grrsplash_shown != 0) {
// first of all, show the logo of the awesome GRRLIB at whitescreen
GRRLIB_FillScreen(COLOR_white); // white rockz
GRRLIB_texImg grrsplash;
grrsplash = GRRLIB_LoadTexture(grrlibsplash);
GRRLIB_DrawImg(0,0,grrsplash,0,0,0,COLOR_white);
GRRLIB_Render();
sleep(3);
grrsplash_shown = 1;
}
}
return 0;
}Offline
OK, now I'm getting tired, so follow the standard procedure or I'll wont be able to help you further:
1) Download GRRLIB: http://grrlib.santo.fr/release/GRRLib4.0.0.rar
2) Extract it to C:\devkitPro\examples\wii\
3) Go to C:\devkitPro\examples\wii\grrlib\examples\template and compile the code. If it works go to step 4, else paste your error on this forum
4) Change the code in C:\devkitPro\examples\wii\grrlib\examples\template\source\main.c
5) Enjoy homebrewing
Offline
Crayon wrote:
OK, now I'm getting tired, so follow the standard procedure or I'll wont be able to help you further:
1) Download GRRLIB: http://grrlib.santo.fr/release/GRRLib4.0.0.rar
2) Extract it to C:\devkitPro\examples\wii\
3) Go to C:\devkitPro\examples\wii\grrlib\examples\template and compile the code. If it works go to step 4, else paste your error on this forum
4) Change the code in C:\devkitPro\examples\wii\grrlib\examples\template\source\main.c
5) Enjoy homebrewing
Okay, this one works ![]()
I now got a more standard installation of GRRLIB ![]()
Offline
Big respect to Crayon for this thread ![]()
Offline