cpplibs

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

cpplibs

Post by Neizan »

Hi

when I tried to install this library it shows a compilation error:

Code: Select all

fran@fran-desktop:~/trunk/cpplibs$ make
cd libpsp2d && make
make[1]: se ingresa al directorio `/home/fran/trunk/cpplibs/libpsp2d'
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include  -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -I..  -c -o framebuffer.o framebuffer.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include  -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -I..  -c -o Exception.o Exception.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include  -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -I..  -c -o Drawable.o Drawable.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include  -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -I..  -c -o Screen.o Screen.cpp
Screen.cpp: In static member function ‘static u32* PSP2D::Screen::getList()’:
Screen.cpp:229: error: conversión inválida de ‘unsigned int*’ a ‘u32*’
Screen.cpp: In member function ‘void PSP2D::Screen::_saveToPNG(const std::string&)’:
Screen.cpp:298: aviso: la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto
Screen.cpp:298: error: conversión inválida de ‘int*’ a ‘int’
Screen.cpp:298: error:   argumento de inicialización 4 de ‘int sceDisplayGetFrameBuf(void**, int*, int*, int)’
make[1]: *** [Screen.o] Error 1
make[1]: se sale del directorio `/home/fran/trunk/cpplibs/libpsp2d'
make: *** [libs] Error 2
fran@fran-desktop:~/trunk/cpplibs$ 
The errors are in Spanish, but I think they are easy to understand. There are any way to solve a invalid conversion without modifying the source code?

I don't know what can I do...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: cpplibs

Post by J.F. »

Neizan wrote: The errors are in Spanish, but I think they are easy to understand. There are any way to solve a invalid conversion without modifying the source code?

I don't know what can I do...
You mean like magic spells or sacrificing a chicken? :)

If there are problems with the code, you have to change it. That's what being a programmer is all about.
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

I mean like compiler options, I don't so much about compiler, but may be it would exists any option that allows to "ignore" some invalid conversions...

I repeat, I don't know so much about compilers, but neither about the u32 variable type shown by the error :S
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

Well.. it seems to have worked:

Code: Select all

Screen.cpp:229: error: conversión inválida de ‘unsigned int*’ a ‘u32*’
For repair this, i have changed

Code: Select all

u32* Screen::getList()
{
  return list;
}
for this:

Code: Select all

u32* Screen::getList()
{
  return (u32*)list;
}
I hope this won't end in a explosion on my computer or something similar... but at least it compile.

The other error was easier.


Bye
Post Reply