Page 1 of 1

devkitPPC make Error 1

Posted: Tue Mar 02, 2010 10:47 pm
by gameFunner
Hi,
I´m trying to write programs with devkitPPC but always when I want to run the program I become Error 1:

"make": *** [run] Error 1

I don´t know what it means. Does anyone know the answere of these problem?
(I copied the program from these Thread (the code):

http://forums.devkitpro.org/viewtopic.php?f=3&t=1754

because I´m learning it. I don´t know that language very well and that´s the reason why I wanted to learn that program too.) How could I change the sentence "Hello World"?
And another question how can I compile the programs?

Sorry for my bad English.

Thanks for answeres.

Re: devkitPPC make Error 1

Posted: Thu Mar 04, 2010 2:06 am
by WinterMute
You haven't really given enough information to say what the problem might be.

What OS are you using? How are you running make? Does it compile and is it just the run target that isn't working?

Re: devkitPPC make Error 1

Posted: Thu Mar 04, 2010 8:09 pm
by gameFunner
Windows XP Home Edition
Service Pack 2

Re: devkitPPC make Error 1

Posted: Sun Mar 07, 2010 4:09 pm
by vuurrobin
Its usally more helpfull to anwser all questions, instead of just the first one.
WinterMute wrote:How are you running make? Does it compile and is it just the run target that isn't working?

Re: devkitPPC make Error 1

Posted: Wed Mar 10, 2010 4:38 pm
by gameFunner
Now it´s running when I follow these steps:

http://wiki.devkitpro.org/index.php/Get ... /devkitPPC[/color]


I copied the program and changed the part

printf "Hello World!"

to something like

printf "written with devkit"

but if I run the program it always says Hello World!

Re: devkitPPC make Error 1

Posted: Thu Mar 11, 2010 12:40 pm
by WinterMute
You need to compile the program before the text will change.

The windows installer provides a number of examples and a lightweight code editor called Programmer's Notepad. Each example has a .pnproj file which you can doubleclick in order to launch PN2 with the example loaded - copy the template folder from examples/gamecube or examples/wii to a new folder (without spaces in it's path). From there you can edit the code in template.c then click Tools->make or use the ALT 1 key compo to build your app.

Having said that, Wii and/or Gamecube programming probably isn't the best place to start with little knowledge of C/C++.

Re: devkitPPC make Error 1

Posted: Sat Mar 13, 2010 11:53 am
by gameFunner
It just works when my path is:

c:\projects\wii\helloworld.

When I copy the template file to my desktop it doesn´t works. It always says Error 2.
I´ve copied the text and changed the "printf hello world" part to "printf written with devkitppc"
but it doesn´t works. I copy the .dol file and rename it boot.dol. When I open it with the HBC (with my Wii) it still says helloworld.
I have compiled it (I "make"-ed it with pressing ALT + 1) and it says ...helloworld.dol is up to date.
But nothing changed.
Do I have to write every thing new without copying any text and writing it on my own. Or do I forgot anything?

Heres the text I copied:
#include <stdio.h>
#include <stdlib.h>
#include <gccore.h>
#include <wiiuse/wpad.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();


// The console understands VT terminal escape codes
// This positions the cursor on row 2, column 0
// we can use variables for this with format codes too
// e.g. printf ("\x1b[%d;%dH", row, column );
printf("\x1b[2;0H");

printf("Hello World!");

while(1) {

// Call WPAD_ScanPads each loop, this reads the latest controller states
WPAD_ScanPads();

// WPAD_ButtonsDown tells us which buttons were pressed in this loop
// this is a "one shot" state which will not fire again until the button has been released
u32 pressed = WPAD_ButtonsDown(0);

// We return to the launcher application via exit
if ( pressed & WPAD_BUTTON_HOME ) exit(0);

// Wait for the next frame
VIDEO_WaitVSync();
}

return 0;
}
May something is missing like the line:

LIBS := -lwiiuse -lbte -lfat -logc -lm

or do I not need it? If I need it I don´t know where to place it.

Re: devkitPPC make Error 1

Posted: Sat Mar 13, 2010 12:08 pm
by WinterMute
Yes, c:\projects\wii\helloworld is a path without spaces, your desktop is not. You can't build a project saved on your desktop, it's impossible to ensure that the spaces don't interfere with the operation of the many tools involved in building code.

Re: devkitPPC make Error 1

Posted: Sat Mar 13, 2010 8:17 pm
by gameFunner
Thanks. I didnt know that. That was important.
But what about the compiling Error???
(I mean that I´ve written before)