C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; #include <dirent.h> DIR * opendir(const char* dir); struct dirent readdir(DIR *dirh); int closedir(DIR *dirh);...
-
11-21-2007, 08:10 AM #6931It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
#include <dirent.h>
DIR * opendir(const char* dir);
struct dirent readdir(DIR *dirh);
int closedir(DIR *dirh);
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
11-21-2007, 08:10 AM #6932
Since you're allready using the c i/o functions why not use them for dir listing too ?
Zitat von coolguy5678
aren't the sce file i/o functions actually wrapper for the c file i/o?
anyway it works just fine with the c file i/o.
to determine the executable path you can analyse the argv command, tho i'm pretty sure this will only get you the exe name
Not every error happens in main ;)
Zitat von BigSanFrey
Unless you make the 2 global or advance to a better coding style you keep getting this error
=> read up on global variablesrobot mafia
-
11-21-2007, 08:12 AM #6933It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Nope, it gives you the full path of the PBP.
Zitat von tommydanger
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
11-21-2007, 08:16 AM #6934
Just to make sure....
Zitat von BigSanFrey
Your including pspctrl to your source code right?
CheersPlaco23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-21-2007, 09:31 PM #6935QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
where? :s
Zitat von coolguy5678
WHA!?
-
11-21-2007, 11:02 PM #6936QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Ok, im trying to make a 2d tile engine, but the problem is its not loading the tiles to the correctly to the array, here is my full main.c,
http://pastebin.com/m35b3bb94
the error is in the loading function, and im not sure how to go to the next char when reading.NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
11-22-2007, 01:26 AM #6937QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
where can i get vshblitter 0.2? i have only found one that links to sendspace which does not work.. link is expired
WHA!?
-
11-22-2007, 01:38 AM #6938
Zitat von BigSanFrey
Help yourself!
http://whazilla.0x89.org/flames/VSHBlitter0.2.tar.gzPlaco23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-22-2007, 01:53 AM #6939QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
what does
mean :s?Code:/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -ljpeg collect2: ld returned 1 exit status make: *** [VSHblitter.elf] Error 1
WHA!?
-
11-22-2007, 01:56 AM #6940
Have you got jpeg installed????
Zitat von BigSanFrey
If not...
Code:svn checkout svn://svn.ps2dev.org/psp/trunk/jpeg cd jpeg make make install
Placo23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-22-2007, 01:56 AM #6941QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
yep, i installed jpeg :s
WHA!?
-
11-22-2007, 02:04 AM #6942
Zitat von BigSanFrey
And you still have the same?
What's in ur code?Placo23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-22-2007, 02:07 AM #6943QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
[email protected]:~/Desktop/VSHBlitter0.2$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -Os -G0 -Wall -g -D_PSP_FW_VERSION=150 -L. -L/usr/local/pspdev/psp/sdk/lib -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nostartfiles main.o blit.o graphics.o picture_icon.o -lpng -ljpeg -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -o VSHblitter.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -ljpeg
collect2: ld returned 1 exit status
make: *** [VSHblitter.elf] Error 1
[email protected]:~/Desktop/VSHBlitter0.2$
thats the result after i type "make"
main.c
MakefileCode:#include <pspkernel.h> #include <pspdisplay.h> #include <stdlib.h> #include <pspdebug.h> #include <pspsdk.h> #include <pspctrl.h> #include <pspgu.h> #include <pspthreadman.h> #include <stdio.h> #include <string.h> #include "blit.h" #include <psploadcore.h> #include <pspiofilemgr.h> #include <malloc.h> PSP_MODULE_INFO("textblit", 0x1000, 1, 1); PSP_MAIN_THREAD_ATTR(0); int main_thread(SceSize args, void *argp) { sceKernelDelayThread(3000000);//wait for xmb to load up// blit_setup(); unsigned int posx = 0; unsigned int posy = 20; while(1) { posx++; blit_string(posx, posy, "HELLO WORLD"); sceDisplayWaitVblankStart(); sceKernelDelayThread(1000); } sceKernelSleepThread(); return 0; } int module_start(SceSize args, void *argp) { int thid; /* Create a high priority thread */ thid = sceKernelCreateThread("driver", main_thread, 0x18, 0x1000, 0, NULL);//8, 64*1024, PSP_THREAD_ATTR_USER, NULL); if(thid >= 0) sceKernelStartThread(thid, args, argp); return 0; }
Code:TARGET = VSHblitter OBJS = main.o blit.o graphics.o picture_icon.o BUILD_PRX = 1 PRX_EXPORTS = exports.exp #USE_PSPSDK_LIBC = 1 INCDIR = LIBDIR = LIBS = -lpng -ljpeg -lz -lm LDFLAGS = CFLAGS = -Os -G0 -Wall -g CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) PSPSDK = $(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build_prx.mak
WHA!?
-
11-22-2007, 02:25 AM #6944
Are you on Linux? I've just tested this on my windows box, and it worked straight away, but when I tested the same code from my Linux Ubuntu box, i've had the same error, but instead of being with the jpeg, I got it from png. Though I have it properly installed
Zitat von BigSanFrey
CheersPlaco23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-22-2007, 02:38 AM #6945QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
yep, im on Ubuntu
!
WHA!?
-
11-22-2007, 04:57 AM #6946
Same here!!!!
Zitat von BigSanFrey
Placo23
Why not donate and become part of this selected list?Spoiler for Wanna see my Apps?:Spoiler for Donators:
-
11-22-2007, 09:12 AM #6947It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You probably installed libjpeg from apt, yes? Well, if so, you installed it wrong. You need to do exactly what was specified on the previous page. Including make install. If you don't, it won't show up. If make install gives you errors, do sudo make install.
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
11-22-2007, 12:22 PM #6948I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I'm having a problem adding 2 functions to an app, I want to launch in different kernels, so I've been using the SDK from the Hen C, but I also want to add the option to use the NoUMD for the newer firmwares, which the library included does not allow.
I've tried using the newest library (from the 3.71 SDK), but this doesn't have the former function of changing loading kernels, I've tried adding both libraries to my app, but I get a string of errors, so my question is, is there another library that has both of these options on, and if not, is there any way I can link both libraries into the app without conflict?
Thanks
-Aura
-
11-22-2007, 12:28 PM #6949QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
i did:
svn checkout svn://svn.pspdev.org/psp/trunk/jpeg
sudo ./configure
sudo make
sudo make install
same error still :sWHA!?
-
11-22-2007, 12:49 PM #6950It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Delete it, redownload it and DO NOT run configure. The makefile is already prepared.
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
11-22-2007, 01:13 PM #6951lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
How would you compile a program made in OSLib for use on a PC?
Geändert von Anti-QuickJay (11-22-2007 um 04:12 PM Uhr)
-
11-22-2007, 01:19 PM #6952Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
argh i am getting annoyed now
could someone please tell mewhy i get this new error when trying to compile luaplayer for psp version 0.20
EDIT:Code:[email protected]:~/projects/LuaPlayer$ make make: freetype-config: Command not found make: freetype-config: Command not found psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O0 -fno-strict-aliasing -mno-explicit-relocs -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150 -c -o src/graphics.o src/graphics.cpp In file included from src/graphics.h:4, from src/graphics.cpp:13: /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory In file included from src/graphics.cpp:13: src/graphics.h:5:10: error: #include expects "FILENAME" or <FILENAME> src/graphics.h:268: warning: ‘fontPrintTextImage’ initialized and declared ‘extern’ src/graphics.h:268: error: variable or field ‘fontPrintTextImage’ declared void src/graphics.h:268: error: ‘FT_Bitmap’ was not declared in this scope src/graphics.h:268: error: ‘bitmap’ was not declared in this scope src/graphics.h:268: error: expected primary-expression before ‘int’ src/graphics.h:268: error: expected primary-expression before ‘int’ src/graphics.h:268: error: expected primary-expression before ‘color’ src/graphics.h:268: error: expected primary-expression before ‘*’ token src/graphics.h:268: error: ‘image’ was not declared in this scope src/graphics.h:268: error: initializer expression list treated as compound expression src/graphics.h:278: warning: ‘fontPrintTextScreen’ initialized and declared ‘extern’ src/graphics.h:278: error: variable or field ‘fontPrintTextScreen’ declared void src/graphics.h:278: error: ‘FT_Bitmap’ was not declared in this scope src/graphics.h:278: error: ‘bitmap’ was not declared in this scope src/graphics.h:278: error: expected primary-expression before ‘int’ src/graphics.h:278: error: expected primary-expression before ‘int’ src/graphics.h:278: error: expected primary-expression before ‘color’ src/graphics.h:278: error: initializer expression list treated as compound expression src/graphics.cpp:615: error: variable or field ‘fontPrintTextImpl’ declared void src/graphics.cpp:615: error: ‘FT_Bitmap’ was not declared in this scope src/graphics.cpp:615: error: ‘bitmap’ was not declared in this scope src/graphics.cpp:615: error: expected primary-expression before ‘int’ src/graphics.cpp:615: error: expected primary-expression before ‘int’ src/graphics.cpp:615: error: expected primary-expression before ‘color’ src/graphics.cpp:615: error: expected primary-expression before ‘*’ token src/graphics.cpp:615: error: ‘framebuffer’ was not declared in this scope src/graphics.cpp:615: error: expected primary-expression before ‘int’ src/graphics.cpp:615: error: expected primary-expression before ‘int’ src/graphics.cpp:615: error: expected primary-expression before ‘int’ src/graphics.cpp:615: error: initializer expression list treated as compound expression src/graphics.cpp:616: error: expected ‘,’ or ‘;’ before ‘{’ token src/graphics.cpp:649: error: variable or field ‘fontPrintTextImage’ declared void src/graphics.cpp:649: error: redefinition of ‘int fontPrintTextImage’ src/graphics.h:268: error: ‘int fontPrintTextImage’ previously defined here src/graphics.cpp:649: error: ‘FT_Bitmap’ was not declared in this scope src/graphics.cpp:649: error: ‘bitmap’ was not declared in this scope src/graphics.cpp:649: error: expected primary-expression before ‘int’ src/graphics.cpp:649: error: expected primary-expression before ‘int’ src/graphics.cpp:649: error: expected primary-expression before ‘color’ src/graphics.cpp:649: error: expected primary-expression before ‘*’ token src/graphics.cpp:649: error: ‘image’ was not declared in this scope src/graphics.cpp:654: error: variable or field ‘fontPrintTextScreen’ declared void src/graphics.cpp:654: error: redefinition of ‘int fontPrintTextScreen’ src/graphics.h:278: error: ‘int fontPrintTextScreen’ previously defined here src/graphics.cpp:654: error: ‘FT_Bitmap’ was not declared in this scope src/graphics.cpp:654: error: ‘bitmap’ was not declared in this scope src/graphics.cpp:654: error: expected primary-expression before ‘int’ src/graphics.cpp:654: error: expected primary-expression before ‘int’ src/graphics.cpp:654: error: expected primary-expression before ‘color’ src/graphics.cpp:615: warning: ‘fontPrintTextImpl’ defined but not used make: *** [src/graphics.o] Error 1 [email protected]:~/projects/LuaPlayer$
went back into freetype directory and typed ./configure
then make install
then i went back to lua player directory and now i get this
Code:[email protected]:~/projects/LuaPlayer$ make 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 -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-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 -D_PSP_FW_VERSION=150 -c -o src/sound.o src/sound.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luaplayer.o src/luaplayer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/utility.o src/utility.cpp /usr/local/pspdev/bin/bin2c src/auxiliary/boot.lua boot.cpp bootString /usr/local/pspdev/bin/bin2c src/auxiliary/Vera.ttf vera.cpp ttfVera /usr/local/pspdev/bin/bin2c src/auxiliary/VeraMono.ttf veraMono.cpp ttfVeraMono 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 -D_PSP_FW_VERSION=150 -c -o src/main.o src/main.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/framebuffer.o src/framebuffer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luacontrols.o src/luacontrols.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luagraphics.o src/luagraphics.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luasound.o src/luasound.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luatimer.o src/luatimer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luasystem.o src/luasystem.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luawlan.o src/luawlan.cpp src/luawlan.cpp: In function ‘int Socket_tostring(lua_State*)’: src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 4 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 5 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 6 has type ‘long unsigned int’ 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 -D_PSP_FW_VERSION=150 -c -o src/lua3d.o src/lua3d.cpp src/lua3d.cpp: In function ‘void lua3D_init(lua_State*)’: src/lua3d.cpp:355: error: ‘GU_COLOR_RES1’ was not declared in this scope src/lua3d.cpp:356: error: ‘GU_COLOR_RES2’ was not declared in this scope src/lua3d.cpp:357: error: ‘GU_COLOR_RES3’ was not declared in this scope make: *** [src/lua3d.o] Error 1 [email protected]:~/projects/LuaPlayer$
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
11-22-2007, 03:49 PM #6953QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
It's missing out an include because of that error, that could be the cause to alot of the problems. Check the graphics.h file.Code:src/graphics.h:5:10: error: #include expects "FILENAME" or <FILENAME>
...Just Returned To The Scene...
-
11-22-2007, 08:38 PM #6954QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Alright, i know what i half to do, i have to read the text file and put each character into the 2d array, but how would i do this?
Zitat von BlackShark
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
11-23-2007, 01:33 AM #6955Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
Assuming the text file starts with 2 integers containing the x and y size of the map, this should work;
Zitat von BlackShark
Code:FILE *fp = fopen( "file", "rb" ); // open the file unsigned int sizex, sizey, i; char **map; // put the map data in this fread( &sizex, sizeof(int), 1, fp ); // read the x size of the map into sizex fread( &sizey, sizeof(int), 1, fp ); // same with y map = (char**) malloc( sizeof(char*) * sizex ); // allocate memory for( i = 0; i < sizex; i++ ) { map[i] = (char*) malloc( sizeof(char) * sizey ); } for( i = 0; i < sizex*sizey; i++ ) { map[i/sizey][i%sizey] = fgetc( fp ); // read the data }
-
11-23-2007, 02:08 AM #6956
i reformatted my PC but I backed up my whole c:\cygwin directory. ive copied it all back over but now when I run cygwin i get
in the command propt window. what do i need to do to get cygwin up and running againCode:bash-3.2$
-
11-23-2007, 02:36 AM #6957QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
how would the text file layout be? (spaces? no spaces? can i use char's other than numbers? if so, how would i blit them?
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
11-23-2007, 08:54 AM #6958Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
does anyone know the svn download link for luaplayer thanks
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
11-23-2007, 08:59 AM #6959QJ Gamer Gold
- Registriert seit
- Aug 2006
- Ort
- Under Your Bed
- Beiträge
- 3.083
- Points
- 12.189
- Level
- 72
- Downloads
- 0
- Uploads
- 0
svn co svn://svn.ps2dev.org/psp/trunk/luaplayer
-
11-23-2007, 09:17 AM #6960Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
thanks
but error
svn: URL 'svn://svn.ps2dev.org/psp/trunk/luaplayer' doesn't exist
nvm i searched for the url in fire fox this is the right link
svn://svn.ps2dev.org/pspware/trunk/LuaPlayer[
-= Double Post =-
argh new error
what is -llua is it a file if so how do i get it or can someone send me it pleaseCode:[email protected]:~/projects/svn_luaplayer/LuaPlayer$ make clean rm -f luaplayer.prx moreclean luaplayer.elf src/exports.o src/graphics.o src/sound.o src/luaplayer.o src/utility.o src/main.o src/framebuffer.o src/luacontrols.o src/luagraphics.o src/luasound.o src/luatimer.o src/luasystem.o src/luawlan.o src/lua3d.o loadlib.o PARAM.SFO EBOOT.PBP [email protected]:~/projects/svn_luaplayer/LuaPlayer$ make 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 -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-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 -D_PSP_FW_VERSION=150 -c -o src/sound.o src/sound.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luaplayer.o src/luaplayer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/utility.o src/utility.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/main.o src/main.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/framebuffer.o src/framebuffer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luacontrols.o src/luacontrols.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luagraphics.o src/luagraphics.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luasound.o src/luasound.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luatimer.o src/luatimer.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luasystem.o src/luasystem.cpp 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 -D_PSP_FW_VERSION=150 -c -o src/luawlan.o src/luawlan.cpp src/luawlan.cpp: In function ‘int Socket_tostring(lua_State*)’: src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 4 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 5 has type ‘long unsigned int’ src/luawlan.cpp:343: warning: format ‘%i’ expects type ‘int’, but argument 6 has type ‘long unsigned int’ 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 -D_PSP_FW_VERSION=150 -c -o src/lua3d.o src/lua3d.cpp psp-gcc -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 -c -o loadlib.o loadlib.S psp-build-exports -b src/exports.exp > src/exports.c psp-gcc -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 -D_PSP_FW_VERSION=150 -c -o src/exports.o src/exports.c psp-gcc -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 -D_PSP_FW_VERSION=150 -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx src/graphics.o src/sound.o src/luaplayer.o src/utility.o src/main.o src/framebuffer.o src/luacontrols.o src/luagraphics.o src/luasound.o src/luatimer.o src/luasystem.o src/luawlan.o src/lua3d.o loadlib.o src/exports.o -llua -llualib -lpng -ljpeg -lz -lpspgum -lm -lmikmod -lmmio -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -lfreetype -lpsprtc -lpspaudiolib -lpspaudio -lpspusb -lpspusbstor -lpsppower -lpspwlan -lpspgu -lpspdebug -lpsphprm_driver -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o luaplayer.elf /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: skipping incompatible /usr/local/lib/liblua.a when searching for -llua /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/liblua.a when searching for -llua /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/lib/liblua.a when searching for -llua /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/bin/../lib/liblua.a when searching for -llua /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: cannot find -llua collect2: ld returned 1 exit status make: *** [luaplayer.elf] Error 1 rm src/exports.c [email protected]:~/projects/svn_luaplayer/LuaPlayer$
Geändert von FaT3oYCG (11-23-2007 um 09:50 AM Uhr) Grund: Automerged Doublepost
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).


LinkBack URL
About LinkBacks
Mit Zitat antworten


Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum