Veréis, yo hace tiempo que aprendí C, y no lo he tocado en al menos 1 año. Por ello, no sé si lo estoy haciendo bien, y he repasado cosas y demás... pero nada, no encuentro el error. No sé si es que perdí la prática o yo que sé qué xD
Bueno, el lío. Me estoy dedicando a esto de la programación en Wii y DS, y feliz que estoy yo con Palib, pero me ha surgido un problema. No sé por qué, no se compila bien esto (me crea el folder de build, pero no los .nds):
#include <PA9.h>
char texto[200];
int main(int argc, char ** argv)
{
PA_Init();
PA_InitVBL();
PA_InitText( 1, 2 );
PA_InitKeyboard(2);
PA_KeyboardIn(20, 95);
PA_OutputSimpleText( 1, 1, 1, "Hola, Mundo!" );
PA_OutputSimpleText( 1, 1, 2, "Por Hymake" );
s32 nletra = 0;
char letra = 0;
while(1){
if (Pad.Held.A) {
PA_OutputSimpleText( 1, 1, 4, "Boton A = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 4, "Boton A = No pulsado" );
}
if (Pad.Held.B) {
PA_OutputSimpleText( 1, 1, 5, "Boton B = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 5, "Boton B = No pulsado" );
}
if (Pad.Held.X) {
PA_OutputSimpleText( 1, 1, 6, "Boton X = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 6, "Boton X = No pulsado" );
}
if (Pad.Held.Y) {
PA_OutputSimpleText( 1, 1, 7, "Boton Y = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 7, "Boton Y = No pulsado" );
}
if (Pad.Held.Up) {
PA_OutputSimpleText( 1, 1, 8, "Boton Up = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 8, "Boton Up = No pulsado" );
}
if (Pad.Held.Down) {
PA_OutputSimpleText( 1, 1, 9, "Boton Down = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 9, "Boton Down = No pulsado" );
}
if (Pad.Held.Left) {
PA_OutputSimpleText( 1, 1, 10, "Boton Left = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 10, "Boton Left = No pulsado" );
}
if (Pad.Held.Right) {
PA_OutputSimpleText( 1, 1, 11, "Boton Right = Pulsado " );
} else {
PA_OutputSimpleText( 1, 1, 11, "Boton Right = No pulsado" );
}
if (Pad.Newpress.Start) {
break;
}
letra = PA_CheckKeyboard();
if (lera > 31) {
texto[nletra] = letra;
nletra++;
}
else if(letra == PA_TAB){
u8 i;
for (i = 0; i < 4; i++){
texto[nletra] = ' ';
nletra++;
}
}
else if ((letra == PA_BACKSPACE)&&nletra) {
nletra--;
texto[nletra] = ' ';
}
else if (letra == '\n'){
texto[nletra] = letra;
nletra++;
}
PA_OutputSimpleText(1, 2, 12, texto);
PA_WaitForVBL();
}
return 0;
}
Si alguien pudiera decirme qué falla... es que no tengo idea alguna de por qué no funciona :S
Gracias por todo,
Hymake
Mi blog -> http://hymake.blogspot.com
Mi web -> http://laburpen.mihostac.es
Seria mas util que postearas
Seria mas util que postearas el log de la compilacion, ya que si no te crea el .NDS, es casi seguro que sea un error de linking provocado por alguna variable de path mal puesta, mas que de un error tuyo de codigo.
Saludos
NightFox
PALIB staff
Nuestra web oficial:
http://www.nightfoxandco.com/
Siguenos en facebook:
http://www.facebook.com/pages/NightFox-Co/284338634917917
Por favor, no useis los MP para preguntas, usar el FORO:
http://www.nightfoxandco.com/forum/
Asi nos ahorramos de contestar lo mismo 20 veces.
Bueno, he cargado el build
Bueno, he cargado el build otra vez, y esto es lo que me pone.
C:\devkitPro\palib\miprueba>make clean
clean ...miprueba
C:\devkitPro\palib\miprueba>make
main.c
In file included from C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:10,
from C:/devkitPro/palib/lib/include/nds/arm9/PA_BgTiles.h:7,
from C:/devkitPro/palib/lib/include/nds/arm9/PA_Text.h:9,
from C:/devkitPro/palib/lib/include/nds/arm9/PA_GBFS.h:15,
from C:/devkitPro/palib/lib/include/nds/PA9.h:19,
from c:/devkitPro/palib/miprueba/source/main.c:1:
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_ReserveChanne
l':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:331: warning: 'getIPC' is stat
ic but used in inline function 'AS_ReserveChannel' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SetMasterVolu
me':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:337: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMasterVolume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:338: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMasterVolume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SoundStop':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:370: warning: 'getIPC' is stat
ic but used in inline function 'AS_SoundStop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:372: warning: 'getIPC' is stat
ic but used in inline function 'AS_SoundStop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:373: warning: 'getIPC' is stat
ic but used in inline function 'AS_SoundStop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:373: warning: 'getIPC' is stat
ic but used in inline function 'AS_SoundStop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_MP3Pause':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:379: warning: 'getIPC' is stat
ic but used in inline function 'AS_MP3Pause' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:380: warning: 'getIPC' is stat
ic but used in inline function 'AS_MP3Pause' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_MP3Unpause':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:386: warning: 'getIPC' is stat
ic but used in inline function 'AS_MP3Unpause' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:387: warning: 'getIPC' is stat
ic but used in inline function 'AS_MP3Unpause' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_MP3Stop':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:393: warning: 'getIPC' is stat
ic but used in inline function 'AS_MP3Stop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_GetMP3Status'
:
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:400: warning: 'getIPC' is stat
ic but used in inline function 'AS_GetMP3Status' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SetMP3Volume'
:
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:406: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Volume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:406: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Volume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:407: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Volume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:407: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Volume' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SetMP3Delay':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:413: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Delay' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SetMP3Loop':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:419: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Loop' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h: In function 'AS_SetMP3Rate':
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:425: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Rate' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/as_lib9.h:426: warning: 'getIPC' is stat
ic but used in inline function 'AS_SetMP3Rate' which is not static
In file included from C:/devkitPro/palib/lib/include/nds/arm9/PA_BgTiles.h:7,
from C:/devkitPro/palib/lib/include/nds/arm9/PA_Text.h:9,
from C:/devkitPro/palib/lib/include/nds/arm9/PA_GBFS.h:15,
from C:/devkitPro/palib/lib/include/nds/PA9.h:19,
from c:/devkitPro/palib/miprueba/source/main.c:1:
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h: In function 'PA_PowerOff':
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:47: warning: 'getIPC' is st
atic but used in inline function 'PA_PowerOff' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h: In function 'PA_CheckLid':
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:308: warning: 'getIPC' is s
tatic but used in inline function 'PA_CheckLid' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:314: warning: 'getIPC' is s
tatic but used in inline function 'PA_CheckLid' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h: In function 'PA_SetScreenL
ight':
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:385: warning: 'getIPC' is s
tatic but used in inline function 'PA_SetScreenLight' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:386: warning: 'getIPC' is s
tatic but used in inline function 'PA_SetScreenLight' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h: In function 'PA_SetLedBlin
k':
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:402: warning: 'getIPC' is s
tatic but used in inline function 'PA_SetLedBlink' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_General.h:403: warning: 'getIPC' is s
tatic but used in inline function 'PA_SetLedBlink' which is not static
In file included from C:/devkitPro/palib/lib/include/nds/PA9.h:71,
from c:/devkitPro/palib/miprueba/source/main.c:1:
C:/devkitPro/palib/lib/include/nds/arm9/PA_16c.h: In function 'PA_16c8pixels':
C:/devkitPro/palib/lib/include/nds/arm9/PA_16c.h:61: warning: 'PA_Plot8Pixels' i
s static but used in inline function 'PA_16c8pixels' which is not static
C:/devkitPro/palib/lib/include/nds/arm9/PA_16c.h: In function 'PA_16cLetter':
C:/devkitPro/palib/lib/include/nds/arm9/PA_16c.h:483: warning: 'PA_16c16X16Lette
r' is static but used in inline function 'PA_16cLetter' which is not static
c:/devkitPro/palib/miprueba/source/main.c: In function 'main':
c:/devkitPro/palib/miprueba/source/main.c:76: error: 'lera' undeclared (first us
e in this function)
c:/devkitPro/palib/miprueba/source/main.c:76: error: (Each undeclared identifier
is reported only once
c:/devkitPro/palib/miprueba/source/main.c:76: error: for each function it appear
s in.)
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
C:\devkitPro\palib\miprueba>pause
Presione una tecla para continuar . . .
Mi blog -> http://hymake.blogspot.com
Mi web -> http://laburpen.mihostac.es
XDDDDDDDD Madre mia A
XDDDDDDDD Madre mia
A ver, el problema es que no estas usando las versiones correctas de PALIB y DEVKITARM
La DEVKITARM tiene que ser imperativamete la R21, ni R22 ni R23, y las PALIB la ultima disponible, la 080823.
Desinstalalo todo y vuelve a intentarlo con estas versiones, que son las que se mencionan en el foro oficial.
Saludos
NightFox
Nuestra web oficial:
http://www.nightfoxandco.com/
Siguenos en facebook:
http://www.facebook.com/pages/NightFox-Co/284338634917917
Por favor, no useis los MP para preguntas, usar el FORO:
http://www.nightfoxandco.com/forum/
Asi nos ahorramos de contestar lo mismo 20 veces.
Dios, vale, gracias, es
Dios, vale, gracias, es verdad XDDDD Perdón por molestar por esto ^^U
Aunque la versión que tengo de Palib es justo esa... .____. Bueno, reinstalaré el ARM, y a ver cómo va.
Grax por todo :D
Mi blog -> http://hymake.blogspot.com
Mi web -> http://laburpen.mihostac.es