LuaPlayer Compiling Help

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Google
Posts: 1
Joined: Mon Aug 20, 2007 3:10 am

LuaPlayer Compiling Help

Post by Google »

hey im on linux and i have the PSPSDK toolchain installed and i want to make a stand-alone Lua program that i can compile to an EBOOT can someone explain why i get this error when i try to compile?

Code: Select all

bt LuaPlayer # make -f Makefile.psp-standalone
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs  -I/usr/local/include/freetype2 -I/usr/local/include -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs  -I/usr/local/include/freetype2 -I/usr/local/include -fno-exceptions -fno-rtti   -c -o src/graphics.o src/graphics.cpp
src/graphics.cpp:5:17: error: png.h: No such file or directory
src/graphics.cpp:9:21: error: jpeglib.h: No such file or directory
src/graphics.cpp:10:20: error: jerror.h: No such file or directory
src/graphics.cpp:56: error: variable or field 'user_warning_fn' declared void
src/graphics.cpp:56: error: 'png_structp' was not declared in this scope
src/graphics.cpp:56: error: 'png_const_charp' was not declared in this scope
src/graphics.cpp:56: error: initializer expression list treated as compound expression
src/graphics.cpp:57: error: expected ',' or ';' before '{' token
src/graphics.cpp:78: error: 'png_structp' was not declared in this scope
src/graphics.cpp:79: error: expected ',' or ';' before '{' token
src/graphics.cpp: In function 'Image* loadPngImage(const char*)':
src/graphics.cpp:136: error: 'png_structp' was not declared in this scope
src/graphics.cpp:136: error: expected `;' before 'png_ptr'
src/graphics.cpp:140: error: 'png_ptr' was not declared in this scope
src/graphics.cpp:140: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
src/graphics.cpp:140: error: 'png_create_read_struct' was not declared in this scope
src/graphics.cpp:145: error: 'png_init_io' was not declared in this scope
src/graphics.cpp:146: error: 'loadPngImageImpl' cannot be used as a function
src/graphics.cpp: In function 'Image* loadJpegImageImpl(jpeg_decompress_struct)':
src/graphics.cpp:151: error: 'dinfo' has incomplete type
src/graphics.cpp:151: error: forward declaration of 'struct jpeg_decompress_struct'
src/graphics.cpp:153: error: 'TRUE' was not declared in this scope
src/graphics.cpp:153: error: 'jpeg_read_header' was not declared in this scope
src/graphics.cpp:156: error: 'jpeg_start_decompress' was not declared in this scope
src/graphics.cpp:159: error: 'jpeg_destroy_decompress' was not declared in this scope
src/graphics.cpp:163: error: 'jpeg_destroy_decompress' was not declared in this scope
src/graphics.cpp:173: error: 'jpeg_destroy_decompress' was not declared in this scope
src/graphics.cpp:176: error: 'JCS_GRAYSCALE' was not declared in this scope
src/graphics.cpp:179: error: 'jpeg_read_scanlines' was not declared in this scope
src/graphics.cpp:188: error: 'jpeg_read_scanlines' was not declared in this scope
src/graphics.cpp:198: error: 'jpeg_finish_decompress' was not declared in this scope
src/graphics.cpp:199: error: 'jpeg_destroy_decompress' was not declared in this scope
src/graphics.cpp: In function 'Image* loadJpegImage(const char*)':
src/graphics.cpp:206: error: aggregate 'jpeg_decompress_struct dinfo' has incomplete type and cannot be defined
src/graphics.cpp:207: error: aggregate 'jpeg_error_mgr jerr' has incomplete type and cannot be defined
src/graphics.cpp:208: error: 'jpeg_std_error' was not declared in this scope
src/graphics.cpp:209: error: 'jpeg_create_decompress' was not declared in this scope
src/graphics.cpp:212: error: 'jpeg_destroy_decompress' was not declared in this scope
src/graphics.cpp:215: error: 'jpeg_stdio_src' was not declared in this scope
src/graphics.cpp: At global scope:
src/graphics.cpp:224: error: field 'pub' has incomplete type
src/graphics.cpp:229: error: ISO C++ forbids declaration of 'JOCTET' with no type
src/graphics.cpp:229: error: expected ';' before '*' token
src/graphics.cpp:230: error: 'boolean' does not name a type
src/graphics.cpp:238: error: expected constructor, destructor, or type conversion before 'mem_init_source'
src/graphics.cpp:252: error: expected constructor, destructor, or type conversion before '(' token
src/graphics.cpp:286: error: expected constructor, destructor, or type conversion before 'mem_skip_input_data'
src/graphics.cpp:302: error: expected constructor, destructor, or type conversion before 'mem_term_source'
src/graphics.cpp:306: error: expected constructor, destructor, or type conversion before 'jpeg_mem_src'
src/graphics.cpp:333: error: 'png_size_t' does not name a type
src/graphics.cpp:334: error: 'png_size_t' does not name a type
src/graphics.cpp:337: error: variable or field 'ReadPngData' declared void
src/graphics.cpp:337: error: 'png_structp' was not declared in this scope
src/graphics.cpp:337: error: 'png_bytep' was not declared in this scope
src/graphics.cpp:337: error: 'png_size_t' was not declared in this scope
src/graphics.cpp:337: error: initializer expression list treated as compound expression
src/graphics.cpp:338: error: expected ',' or ';' before '{' token
src/graphics.cpp: In function 'Image* loadImageFromMemory(const unsigned char*, int)':
src/graphics.cpp:356: error: 'png_structp' was not declared in this scope
src/graphics.cpp:356: error: expected `;' before 'png_ptr'
src/graphics.cpp:357: error: 'png_ptr' was not declared in this scope
src/graphics.cpp:357: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
src/graphics.cpp:357: error: 'png_create_read_struct' was not declared in this scope
src/graphics.cpp:363: error: 'struct PngData' has no member named 'size'
src/graphics.cpp:364: error: 'struct PngData' has no member named 'seek'
src/graphics.cpp:365: error: 'png_set_read_fn' was not declared in this scope
src/graphics.cpp:366: error: 'loadPngImageImpl' cannot be used as a function
src/graphics.cpp:370: error: aggregate 'jpeg_decompress_struct dinfo' has incomplete type and cannot be defined
src/graphics.cpp:371: error: aggregate 'jpeg_error_mgr jerr' has incomplete type and cannot be defined
src/graphics.cpp:372: error: 'jpeg_std_error' was not declared in this scope
src/graphics.cpp:373: error: 'jpeg_create_decompress' was not declared in this scope
src/graphics.cpp:374: error: 'jpeg_mem_src' was not declared in this scope
src/graphics.cpp: In function 'void savePngImage(const char*, Color*, int, int, int, int)':
src/graphics.cpp:670: error: 'png_structp' was not declared in this scope
src/graphics.cpp:670: error: expected `;' before 'png_ptr'
src/graphics.cpp:671: error: 'png_infop' was not declared in this scope
src/graphics.cpp:671: error: expected `;' before 'info_ptr'
src/graphics.cpp:677: error: 'png_ptr' was not declared in this scope
src/graphics.cpp:677: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
src/graphics.cpp:677: error: 'png_create_write_struct' was not declared in this scope
src/graphics.cpp:679: error: 'info_ptr' was not declared in this scope
src/graphics.cpp:679: error: 'png_create_info_struct' was not declared in this scope
src/graphics.cpp:681: error: 'png_infopp' was not declared in this scope
src/graphics.cpp:681: error: 'png_destroy_write_struct' was not declared in this scope
src/graphics.cpp:684: error: 'png_init_io' was not declared in this scope
src/graphics.cpp:686: error: 'PNG_COLOR_TYPE_RGBA' was not declared in this scope
src/graphics.cpp:686: error: 'PNG_COLOR_TYPE_RGB' was not declared in this scope
src/graphics.cpp:687: error: 'PNG_INTERLACE_NONE' was not declared in this scope
src/graphics.cpp:687: error: 'PNG_COMPRESSION_TYPE_DEFAULT' was not declared in this scope
src/graphics.cpp:687: error: 'PNG_FILTER_TYPE_DEFAULT' was not declared in this scope
src/graphics.cpp:687: error: 'png_set_IHDR' was not declared in this scope
src/graphics.cpp:688: error: 'png_write_info' was not declared in this scope
src/graphics.cpp:702: error: 'png_write_row' was not declared in this scope
src/graphics.cpp:705: error: 'png_write_end' was not declared in this scope
src/graphics.cpp:706: error: 'png_infopp' was not declared in this scope
src/graphics.cpp:706: error: 'png_destroy_write_struct' was not declared in this scope
src/graphics.cpp: In function 'void saveJpegImage(const char*, Color*, int, int, int)':
src/graphics.cpp:714: error: aggregate 'jpeg_error_mgr jerr' has incomplete type and cannot be defined
src/graphics.cpp:715: error: aggregate 'jpeg_compress_struct cinfo' has incomplete type and cannot be defined
src/graphics.cpp:716: error: 'jpeg_std_error' was not declared in this scope
src/graphics.cpp:717: error: 'jpeg_create_compress' was not declared in this scope
src/graphics.cpp:718: error: 'jpeg_stdio_dest' was not declared in this scope
src/graphics.cpp:722: error: 'JCS_RGB' was not declared in this scope
src/graphics.cpp:723: error: 'jpeg_set_defaults' was not declared in this scope
src/graphics.cpp:724: error: 'TRUE' was not declared in this scope
src/graphics.cpp:724: error: 'jpeg_set_quality' was not declared in this scope
src/graphics.cpp:725: error: 'jpeg_start_compress' was not declared in this scope
src/graphics.cpp:736: error: 'jpeg_write_scanlines' was not declared in this scope
src/graphics.cpp:738: error: 'jpeg_finish_compress' was not declared in this scope
src/graphics.cpp:739: error: 'jpeg_destroy_compress' was not declared in this scope
make: *** [src/graphics.o] Error 1
:( i hope someone can help because im lost
cools
Posts: 46
Joined: Sat Mar 04, 2006 12:57 pm

Post by cools »

you seem to be missing libpng and jpeg from the svn. Just download the psplibraries script and you should be fine:

http://forums.ps2dev.org/viewtopic.php?t=8829
Nezumi
Posts: 3
Joined: Thu Feb 07, 2008 8:42 am

Post by Nezumi »

Is that CPP or Lua? Can you compile a .lua script into an EBOOT? o.o
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

It is a shell script. Run it on your computer and it will install all of the C/C++ libraries for pspdev.
Nezumi
Posts: 3
Joined: Thu Feb 07, 2008 8:42 am

Post by Nezumi »

Ah. Well I went ahead and tried it, got the same errors as 'Google' there did, but went ahead and installed the psplibraries. Now I'm getting this error:

Code: Select all

$ make -f Makefile.psp-standalone
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasi
ng -mno-explicit-relocs  -I/usr/include/freetype2 -I. -I/usr/local/pspdev/psp/sd
k/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs  -I/usr/includ
e/freetype2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150   -c -o src/graphics
.o src/graphics.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasi
ng -mno-explicit-relocs  -I/usr/include/freetype2 -I. -I/usr/local/pspdev/psp/sd
k/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs  -I/usr/includ
e/freetype2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150   -c -o src/sound.o
src/sound.cpp
src/sound.cpp:10: error: expected initializer before '*' token
src/sound.cpp: In function 'void initMikmod()':
src/sound.cpp:26: error: '_mm_RegisterErrorHandler' was not declared in this sco
pe
src/sound.cpp:35: error: 'musichandle' was not declared in this scope
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/include/mikmod.h:225: error:
 too few arguments to function 'BOOL MikMod_Init(CHAR*)'
src/sound.cpp:36: error: at this point in file
src/sound.cpp: In function 'void unloadMikmod()':
src/sound.cpp:42: error: 'musichandle' was not declared in this scope
src/sound.cpp:42: error: 'MikMod_FreeSong' was not declared in this scope
src/sound.cpp: In function 'void loadAndPlayMusicFile(char*, BOOL)':
src/sound.cpp:51: error: 'musichandle' was not declared in this scope
src/sound.cpp:53: error: 'musichandle' was not declared in this scope
src/sound.cpp:53: error: 'MikMod_LoadSong' was not declared in this scope
src/sound.cpp: In function 'void stopAndUnloadMusic()':
src/sound.cpp:60: error: 'musichandle' was not declared in this scope
src/sound.cpp:60: error: 'MikMod_FreeSong' was not declared in this scope
src/sound.cpp: In function 'void musicPause()':
src/sound.cpp:67: error: 'MP_HandleTick' was not declared in this scope
src/sound.cpp: In function 'void musicResume()':
src/sound.cpp:71: error: 'musichandle' was not declared in this scope
src/sound.cpp: In function 'Sound* loadSound(char*)':
src/sound.cpp:77: error: 'WAV_LoadFN' was not declared in this scope
src/sound.cpp: In function 'void unloadSound(Sound*)':
src/sound.cpp:81: error: 'WAV_Free' was not declared in this scope
src/sound.cpp: In function 'Voice playSound(Sound*)':
src/sound.cpp:87: error: 'MikMod_PlaySample' was not declared in this scope
make: *** [src/sound.o] Error 1
Post Reply