Alot of errors cause by png

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

Moderators: cheriff, TyRaNiD

Post Reply
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Alot of errors cause by png

Post by Ghoti »

Hi folks,

i get these error when trying to only compile a file with an include <"png.h"> coded no code used from that library yet.

Code: Select all

psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o -lpspgu -lpng -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -l
pspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
graphics.c&#58;5&#58;17&#58; error&#58; png.h&#58; No such file or directory
It states that png.h is missing but when i copy that into my directory it gives al sorts of duplicate errors

what can i do to get it to work in Visual C++ (microsoft)

P.S. i have posted a sortwise post already but i posted it into a wrong thread it was a thread which i said was solved allready so sorry for the kind of doublepost.
User avatar
JoshDB
Posts: 87
Joined: Wed Oct 05, 2005 3:54 am

Post by JoshDB »

Add -lpng to you makefile under LIBS.

i.e. LIBS = -lpspgu -lpng -lz -lm
sandberg
Posts: 90
Joined: Wed Oct 05, 2005 1:25 am
Location: Denmark

Post by sandberg »

Your include path is set to look in the current directory and in /usr/local/pspdev/psp/sdk/include. If you have compiled and installed libpng the normal way, png.h will be installed in /usr/local/pspdev/psp/include.
So modify your makefile or however that is done in Visual Studio, to add that directory to your include path also.
Br, Sandberg
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

Hi, well i have -lpng in my makefile:

Code: Select all

TARGET = out
OBJS = $&#40;wildcard *.c&#41; ball.o 

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS =
LIBS = -lpspgu -lpng -lz -lm

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak

ball.o&#58; ball.raw
	bin2o -i ball.raw ball.o ball
<-- makefile

the makefile is run through a batch file :
@REM Ne pas afficher les commandes
@ECHO OFF

ECHO Compilatie van het Project.

SET path=%path%;C:\cygwin\bin;C:\cygwin\usr/local/pspdev/bin
SET path=%path%;C:\cygwin\usr\include\libpng12
SET PSPSDK=C:\cygwin\usr/local/pspdev

make.exe

ECHO Effacer les fichiers inutiles
DEL *.o

ECHO Trouver le bon repertoire

SET DRIVE=.\



ECHO Création du PBP
MD %DRIVE%GAME2%%
Elf2pbpm -FILEOUT=%DRIVE%GAME2%%\EBOOT.PBP -TITLE="Game 2: 2D"

ECHO Renommer en EBOOT.PBP
MD %DRIVE%GAME2
MOVE out.elf %DRIVE%GAME2\EBOOT.PBP
which is now kind of a mess but i have put it there but don't know how to add the include path any sugestions
johnmph
Posts: 119
Joined: Sat Jul 23, 2005 11:48 pm

Post by johnmph »

Ghoti wrote:Hi, well i have -lpng in my makefile:

Code: Select all

TARGET = out
OBJS = $&#40;wildcard *.c&#41; ball.o 

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS =
LIBS = -lpspgu -lpng -lz -lm

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak

ball.o&#58; ball.raw
	bin2o -i ball.raw ball.o ball
<-- makefile

the makefile is run through a batch file :
@REM Ne pas afficher les commandes
@ECHO OFF

ECHO Compilatie van het Project.

SET path=%path%;C:\cygwin\bin;C:\cygwin\usr/local/pspdev/bin
SET path=%path%;C:\cygwin\usr\include\libpng12
SET PSPSDK=C:\cygwin\usr/local/pspdev

make.exe

ECHO Effacer les fichiers inutiles
DEL *.o

ECHO Trouver le bon repertoire

SET DRIVE=.\



ECHO Création du PBP
MD %DRIVE%GAME2%%
Elf2pbpm -FILEOUT=%DRIVE%GAME2%%\EBOOT.PBP -TITLE="Game 2: 2D"

ECHO Renommer en EBOOT.PBP
MD %DRIVE%GAME2
MOVE out.elf %DRIVE%GAME2\EBOOT.PBP
which is now kind of a mess but i have put it there but don't know how to add the include path any sugestions
No need to add include path if you have install correctly zlib and png (make and make install), remove :

SET path=%path%;C:\cygwin\usr\include\libpng12

in your make.bat
Ghoti wrote:Hi folks,

i get these error when trying to only compile a file with an include <"png.h"> coded no code used from that library yet.
Use #include <png.h>
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

Hi, I have installed it correctly with the tutorial and it didn't gave an error

i use <png.h> and i have pasted the graphics.c and .h and the framebuffer.c an .h into the directory of my game and then press F7 i get these errors:

Code: Select all

Compilatie van het Project.
bin2o -i ball.raw ball.o ball
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_
apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
graphics.c&#58;5&#58;17&#58; error&#58; png.h&#58; No such file or directory
graphics.c&#58;51&#58; error&#58; syntax error before 'png_ptr'
graphics.c&#58; In function 'loadImage'&#58;
graphics.c&#58;57&#58; error&#58; 'png_structp' undeclared &#40;first use in this function&#41;
graphics.c&#58;57&#58; error&#58; &#40;Each undeclared identifier is reported only once
graphics.c&#58;57&#58; error&#58; for each function it appears in.&#41;
graphics.c&#58;57&#58; error&#58; syntax error before 'png_ptr'
graphics.c&#58;58&#58; error&#58; 'png_infop' undeclared &#40;first use in this function&#41;
graphics.c&#58;60&#58; error&#58; 'png_uint_32' undeclared &#40;first use in this function&#41;
graphics.c&#58;60&#58; error&#58; syntax error before 'width'
graphics.c&#58;63&#58; error&#58; 'FILE' undeclared &#40;first use in this function&#41;
graphics.c&#58;63&#58; error&#58; 'fp' undeclared &#40;first use in this function&#41;
graphics.c&#58;67&#58; warning&#58; implicit declaration of function 'fopen'
graphics.c&#58;68&#58; error&#58; 'png_ptr' undeclared &#40;first use in this function&#41;
graphics.c&#58;68&#58; warning&#58; implicit declaration of function 'png_create_read_struct'
graphics.c&#58;68&#58; error&#58; 'PNG_LIBPNG_VER_STRING' undeclared &#40;first use in this function&#41;
graphics.c&#58;71&#58; warning&#58; implicit declaration of function 'fclose'
graphics.c&#58;74&#58; warning&#58; implicit declaration of function 'png_set_error_fn'
graphics.c&#58;74&#58; error&#58; 'png_voidp' undeclared &#40;first use in this function&#41;
graphics.c&#58;74&#58; error&#58; 'png_error_ptr' undeclared &#40;first use in this function&#41;
graphics.c&#58;75&#58; error&#58; 'info_ptr' undeclared &#40;first use in this function&#41;
graphics.c&#58;75&#58; warning&#58; implicit declaration of function 'png_create_info_struct'
graphics.c&#58;79&#58; warning&#58; implicit declaration of function 'png_destroy_read_struct'
graphics.c&#58;79&#58; error&#58; 'png_infopp_NULL' undeclared &#40;first use in this function&#41;
graphics.c&#58;82&#58; warning&#58; implicit declaration of function 'png_init_io'
graphics.c&#58;83&#58; warning&#58; implicit declaration of function 'png_set_sig_bytes'
graphics.c&#58;84&#58; warning&#58; implicit declaration of function 'png_read_info'
graphics.c&#58;85&#58; warning&#58; implicit declaration of function 'png_get_IHDR'
graphics.c&#58;85&#58; error&#58; 'width' undeclared &#40;first use in this function&#41;
graphics.c&#58;85&#58; error&#58; 'height' undeclared &#40;first use in this function&#41;
graphics.c&#58;85&#58; error&#58; 'int_p_NULL' undeclared &#40;first use in this function&#41;
graphics.c&#58;96&#58; warning&#58; implicit declaration of function 'png_set_strip_16'
graphics.c&#58;97&#58; warning&#58; implicit declaration of function 'png_set_packing'
graphics.c&#58;98&#58; error&#58; 'PNG_COLOR_TYPE_PALETTE' undeclared &#40;first use in this function&#41;
graphics.c&#58;98&#58; warning&#58; implicit declaration of function 'png_set_palette_to_rgb'
graphics.c&#58;99&#58; error&#58; 'PNG_COLOR_TYPE_GRAY' undeclared &#40;first use in this function&#41;
graphics.c&#58;99&#58; warning&#58; implicit declaration of function 'png_set_gray_1_2_4_to_8'
graphics.c&#58;100&#58; warning&#58; implicit declaration of function 'png_get_valid'
graphics.c&#58;100&#58; error&#58; 'PNG_INFO_tRNS' undeclared &#40;first use in this function&#41;
graphics.c&#58;100&#58; warning&#58; implicit declaration of function 'png_set_tRNS_to_alpha'
graphics.c&#58;101&#58; warning&#58; implicit declaration of function 'png_set_filler'
graphics.c&#58;101&#58; error&#58; 'PNG_FILLER_AFTER' undeclared &#40;first use in this function&#41;
graphics.c&#58;118&#58; warning&#58; implicit declaration of function 'png_read_row'
graphics.c&#58;118&#58; error&#58; 'png_bytep_NULL' undeclared &#40;first use in this function&#41;
graphics.c&#58;125&#58; warning&#58; implicit declaration of function 'png_read_end'
graphics.c&#58; In function 'createImage'&#58;
graphics.c&#58;216&#58; warning&#58; implicit declaration of function 'memset'
graphics.c&#58;216&#58; warning&#58; incompatible implicit declaration of built-in function 'memset'
graphics.c&#58; In function 'printTextScreen'&#58;
graphics.c&#58;296&#58; warning&#58; implicit declaration of function 'strlen'
graphics.c&#58;296&#58; warning&#58; incompatible implicit declaration of built-in function 'strlen'
graphics.c&#58; In function 'printTextImage'&#58;
graphics.c&#58;323&#58; warning&#58; incompatible implicit declaration of built-in function 'strlen'
graphics.c&#58; In function 'saveImage'&#58;
graphics.c&#58;343&#58; error&#58; 'png_structp' undeclared &#40;first use in this function&#41;
graphics.c&#58;343&#58; error&#58; syntax error before 'png_ptr'
graphics.c&#58;344&#58; error&#58; 'png_infop' undeclared &#40;first use in this function&#41;
graphics.c&#58;345&#58; error&#58; 'FILE' undeclared &#40;first use in this function&#41;
graphics.c&#58;345&#58; error&#58; 'fp' undeclared &#40;first use in this function&#41;
graphics.c&#58;350&#58; error&#58; 'png_ptr' undeclared &#40;first use in this function&#41;
graphics.c&#58;350&#58; warning&#58; implicit declaration of function 'png_create_write_struct'
graphics.c&#58;350&#58; error&#58; 'PNG_LIBPNG_VER_STRING' undeclared &#40;first use in this function&#41;
graphics.c&#58;352&#58; error&#58; 'info_ptr' undeclared &#40;first use in this function&#41;
graphics.c&#58;354&#58; warning&#58; implicit declaration of function 'png_destroy_write_struct'
graphics.c&#58;354&#58; error&#58; 'png_infopp' undeclared &#40;first use in this function&#41;
graphics.c&#58;358&#58; warning&#58; implicit declaration of function 'png_set_IHDR'
graphics.c&#58;359&#58; error&#58; 'PNG_COLOR_TYPE_RGBA' undeclared &#40;first use in this function&#41;
graphics.c&#58;359&#58; error&#58; 'PNG_COLOR_TYPE_RGB' undeclared &#40;first use in this function&#41;
graphics.c&#58;360&#58; error&#58; 'PNG_INTERLACE_NONE' undeclared &#40;first use in this function&#41;
graphics.c&#58;360&#58; error&#58; 'PNG_COMPRESSION_TYPE_DEFAULT' undeclared &#40;first use in this function&#41;
graphics.c&#58;360&#58; error&#58; 'PNG_FILTER_TYPE_DEFAULT' undeclared &#40;first use in this function&#41;
graphics.c&#58;361&#58; warning&#58; implicit declaration of function 'png_write_info'
graphics.c&#58;375&#58; warning&#58; implicit declaration of function 'png_write_row'
graphics.c&#58;378&#58; warning&#58; implicit declaration of function 'png_write_end'
main.c&#58;30&#58;17&#58; error&#58; png.h&#58; No such file or directory
main.c&#58; In function 'CallbackThread'&#58;
main.c&#58;86&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c&#58; In function 'SetupCallbacks'&#58;
main.c&#58;99&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
make&#58; *** &#91;out.elf&#93; Error 1
Effacer les fichiers inutiles
Trouver le bon repertoire
Création du PBP
Er bestaat al een submap of bestand .\GAME2%.
Creation du PBP terminée -> filesize &#58; 00015345
Renommer en EBOOT.PBP
Er bestaat al een submap of bestand .\GAME2.
Het systeem kan het opgegeven bestand niet vinden.
Error executing c&#58;\windows\system32\cmd.exe.

EBOOT.PBP - 41 error&#40;s&#41;, 32 warning&#40;s&#41;
&#91;/quote&#93; I have installed the zlib and the libpng in Cygwin BTW do i have to install them also in Visual C++ ?
Dr. Vegetable
Posts: 171
Joined: Mon Nov 14, 2005 1:32 am
Location: Boston, Massachusetts
Contact:

Post by Dr. Vegetable »

Code: Select all

graphics.c&#58;5&#58;17&#58; error&#58; png.h&#58; No such file or directory 
In a C or C++ program, always look at the first error. The compiler still isn't finding the png.h header file. You can set a path to search for include files right in your batch file. Just add something like the following to set an include path before you run make.exe:

set include=c:\pspdev\include;c:\pspdev\psp\include;c:\pspdev\psp\sdk\include;

You must change this line to match the configuration of your machine, just use semicolons ';' between directory names.
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

i'm sorry but i still can't get it to work. I searched the png.h and added that as include in the batch:

Code: Select all

@REM Ne pas afficher les commandes
@ECHO OFF

ECHO Compilatie van het Project.

SET path=%path%;C&#58;\cygwin\bin;C&#58;\cygwin\usr/local/pspdev/bin
SET PSPSDK=C&#58;\cygwin\usr/local/pspdev
set include=C&#58;\cygwin\usr\include;C&#58;\cygwin\usr\include\libpng12

make.exe

ECHO Effacer les fichiers inutiles
DEL *.o

ECHO Trouver le bon repertoire

SET DRIVE=.\



ECHO Création du PBP
MD %DRIVE%GAME2%%
Elf2pbpm -FILEOUT=%DRIVE%GAME2%%\EBOOT.PBP -TITLE="Game 2&#58; 2D"

ECHO Renommer en EBOOT.PBP
MD %DRIVE%GAME2
MOVE out.elf %DRIVE%GAME2\EBOOT.PBP

C:\cygwin\usr\include\libpng12 <--- in here the png.h exists
C:\cygwin\usr\include <--- in here a shortcut exists to png.h

i still get the same errors

I tried just copying the png.h and the pngconf.h to my sourcecode folder but then i get these errors:

Code: Select all

Compilatie van het Project.
bin2o -i ball.raw ball.o ball
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspne
t -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
main.c&#58; In function 'CallbackThread'&#58;
main.c&#58;86&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c&#58; In function 'SetupCallbacks'&#58;
main.c&#58;99&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
graphics.o&#58; In function `getVramDrawBuffer'&#58;
graphics.c&#58;&#40;.text+0x4c&#41;&#58; multiple definition of `getVramDrawBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqCS65H.o&#58;graphics.c&#58;&#40;.text+0x4c&#41;&#58; first defined here
graphics.o&#58; In function `getVramDisplayBuffer'&#58;
I just don't get it... (BTW thanks for the many replies everybody.)
johnmph
Posts: 119
Joined: Sat Jul 23, 2005 11:48 pm

Post by johnmph »

Ghoti wrote:i'm sorry but i still can't get it to work. I searched the png.h and added that as include in the batch:

Code: Select all

@REM Ne pas afficher les commandes
@ECHO OFF

ECHO Compilatie van het Project.

SET path=%path%;C&#58;\cygwin\bin;C&#58;\cygwin\usr/local/pspdev/bin
SET PSPSDK=C&#58;\cygwin\usr/local/pspdev
set include=C&#58;\cygwin\usr\include;C&#58;\cygwin\usr\include\libpng12

make.exe

ECHO Effacer les fichiers inutiles
DEL *.o

ECHO Trouver le bon repertoire

SET DRIVE=.\



ECHO Création du PBP
MD %DRIVE%GAME2%%
Elf2pbpm -FILEOUT=%DRIVE%GAME2%%\EBOOT.PBP -TITLE="Game 2&#58; 2D"

ECHO Renommer en EBOOT.PBP
MD %DRIVE%GAME2
MOVE out.elf %DRIVE%GAME2\EBOOT.PBP

C:\cygwin\usr\include\libpng12 <--- in here the png.h exists
C:\cygwin\usr\include <--- in here a shortcut exists to png.h

i still get the same errors

I tried just copying the png.h and the pngconf.h to my sourcecode folder but then i get these errors:

Code: Select all

Compilatie van het Project.
bin2o -i ball.raw ball.o ball
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspne
t -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
main.c&#58; In function 'CallbackThread'&#58;
main.c&#58;86&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c&#58; In function 'SetupCallbacks'&#58;
main.c&#58;99&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
graphics.o&#58; In function `getVramDrawBuffer'&#58;
graphics.c&#58;&#40;.text+0x4c&#41;&#58; multiple definition of `getVramDrawBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqCS65H.o&#58;graphics.c&#58;&#40;.text+0x4c&#41;&#58; first defined here
graphics.o&#58; In function `getVramDisplayBuffer'&#58;
I just don't get it... (BTW thanks for the many replies everybody.)
If you install correctly libpng, the png.h will be in cygwin\usr\local\pspdev\psp\include and not in C:\cygwin\usr\include\libpng12.

For a good install, download libpng and zlib folders (svn://svn.ps2dev.org/psp/) and copy it in c:/cygwin/home/{your login}/

After open a cygwin shell and go into the c:/cygwin/home/{your login}/zlib and tape :

make

and after :

make install

Proceed the same with c:/cygwin/home/{your login}/libpng

After you can erase c:/cygwin/home/{your login}/zlib and c:/cygwin/home/{your login}/libpng folders.

No forget to add library in makefile : -lpng -lz -lm
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

Still not working.

I reinstalled it didn't work, then rereinstalled it and now i don't get any errors anymore about the png.h BUT now i get duplicate errors??? (i also changed the includepath you gave me)

Code: Select all

bin2o -i ball.raw ball.o ball
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspne
t -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
main.c&#58; In function 'CallbackThread'&#58;
main.c&#58;85&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c&#58; In function 'SetupCallbacks'&#58;
main.c&#58;98&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
graphics.o&#58; In function `getVramDrawBuffer'&#58;
graphics.c&#58;&#40;.text+0x4c&#41;&#58; multiple definition of `getVramDrawBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0x4c&#41;&#58; first defined here
graphics.o&#58; In function `getVramDisplayBuffer'&#58;
graphics.c&#58;&#40;.text+0x74&#41;&#58; multiple definition of `getVramDisplayBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0x74&#41;&#58; first defined here
graphics.o&#58; In function `user_warning_fn'&#58;
graphics.c&#58;&#40;.text+0xa8&#41;&#58; multiple definition of `user_warning_fn'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0xa8&#41;&#58; first defined here
graphics.o&#58; In function `loadImage'&#58;
graphics.c&#58;&#40;.text+0xb0&#41;&#58; multiple definition of `loadImage'
Is there something wrong with my computer?
johnmph
Posts: 119
Joined: Sat Jul 23, 2005 11:48 pm

Post by johnmph »

Ghoti wrote:Still not working.

I reinstalled it didn't work, then rereinstalled it and now i don't get any errors anymore about the png.h BUT now i get duplicate errors??? (i also changed the includepath you gave me)

Code: Select all

bin2o -i ball.raw ball.o ball
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   framebuffer.c graphics.c main.c ball.o graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspne
t -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o out.elf
main.c&#58; In function 'CallbackThread'&#58;
main.c&#58;85&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from incompatible pointer type
main.c&#58; In function 'SetupCallbacks'&#58;
main.c&#58;98&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from incompatible pointer type
graphics.o&#58; In function `getVramDrawBuffer'&#58;
graphics.c&#58;&#40;.text+0x4c&#41;&#58; multiple definition of `getVramDrawBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0x4c&#41;&#58; first defined here
graphics.o&#58; In function `getVramDisplayBuffer'&#58;
graphics.c&#58;&#40;.text+0x74&#41;&#58; multiple definition of `getVramDisplayBuffer'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0x74&#41;&#58; first defined here
graphics.o&#58; In function `user_warning_fn'&#58;
graphics.c&#58;&#40;.text+0xa8&#41;&#58; multiple definition of `user_warning_fn'
/cygdrive/c/DOCUME~1/Reinier/LOCALS~1/Temp/ccqiBpCF.o&#58;graphics.c&#58;&#40;.text+0xa8&#41;&#58; first defined here
graphics.o&#58; In function `loadImage'&#58;
graphics.c&#58;&#40;.text+0xb0&#41;&#58; multiple definition of `loadImage'
Is there something wrong with my computer?
Now the zlib and libpng are installed fine.

For the multiple definition, check your makefile and source if you compile same file several times or if you declare several times the same function.
Post Reply