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; can someone show me how to create a simple bullet system for a side scroller game...
-
09-18-2008, 10:59 AM #9091
- Registriert seit
- Aug 2008
- Beiträge
- 18
- Points
- 2.361
- Level
- 29
- Downloads
- 0
- Uploads
- 0
can someone show me how to create a simple bullet system for a side scroller game
-
09-18-2008, 11:01 AM #9092Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
At least pretend you have tried to code one.
-
09-18-2008, 11:05 AM #9093QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
When bullet is fired, create a new bullet object.
Give the new bullet object a start position and a velocity.
Add the bullet object to the list of bullets.
Every frame, iterate through the list, update the position of each bullet based on it's velocity and time elapsed since last frame. Also check with if the bullet has collided with another object.
If you want to destroy the bullet, remove it from the list.[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
09-18-2008, 04:11 PM #9094
- Registriert seit
- Aug 2008
- Beiträge
- 18
- Points
- 2.361
- Level
- 29
- Downloads
- 0
- Uploads
- 0
i eventually figured it out thanks anyway yaustar
-
09-20-2008, 04:32 PM #9095
- Registriert seit
- Mar 2008
- Beiträge
- 19
- Points
- 2.721
- Level
- 31
- Downloads
- 0
- Uploads
- 0
sort of off topic, but how long do you think it would take for a n00b to figure out how to do some basic things in lua? and what specific program is recommended?
-
09-20-2008, 04:41 PM #9096
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Well, it depends on the noob. If you're posting Lua questions in the C/C++ help thread then probably a long time. If you want to learn Lua then the program you'll want to work with would probably be Lua. If you want to use Lua on the PSP then LuaPlayer.
-
09-21-2008, 04:31 AM #9097Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
<shameless plug>Or PGE Lua</shameless plug>

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
09-22-2008, 04:33 PM #9098
I was wondering How I can obtain FPS in VSH's context? :confusion:
I'm out of ideas... :o
-
09-23-2008, 08:23 AM #9099I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
-
09-23-2008, 09:09 AM #9100
-
09-24-2008, 11:44 AM #9101
- Registriert seit
- Aug 2008
- Beiträge
- 18
- Points
- 2.361
- Level
- 29
- Downloads
- 0
- Uploads
- 0
ok i need alil help..i know alot of ppl in this qj forum dnt want to help noobs..anyway i know some will so asking asking what i am doing wrong in these lines of code,
ok here is my explaination of whats wrong, i try to make my sprite jump on to a small platform.i did the collision function thing if am correct and i got to the point where the sprite gets collision block when its under the platform and tries to jump which is a good thing and when i jump on to it i get collision and the sprite just stays there cnt be moved, i cnt seem to make my sprite jump off again i think i know whats the problem but being a noob 2days trying to slove it on my own just isnt helping lol plz point me int the right direction.tanx// Here it is the begin of the player jump code
if (osl_keys->held.cross && sprite->y == 200)
{if (!collision(sprite,sprite->x, sprite->y - 2, platform, platform->x, platform->y ))// test collision - 2 pixel
sprite_vel_y = 20;
sprite_jumping = 1;
}
if (!collision(sprite, sprite->x, sprite->y + 2, platform, platform->x, platform->y ))// test collision + 2 pixel
if (sprite_jumping == 1) /* Move sprite if we are jumping */
{
sprite_vel_y = sprite_vel_y - sprite_accel;
sprite->y = sprite->y - sprite_vel_y;
}
if (sprite->y >= 200) /* Check to see if sprite has hit floor */
{
sprite_vel_y = 0;
sprite_jumping = 0;
sprite->y = 200;
}
-
09-24-2008, 11:57 AM #9102QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
cleaned up code a bit
now than, i can't see the problem with just this code, at the same time i put {}'s around all the if statements,Code:if (osl_keys->held.cross && sprite->y == 200){ if (!collision(sprite,sprite->x, sprite->y - 2, platform, platform->x, platform->y)){ sprite_vel_y = 20; } sprite_jumping = 1; } if (!collision(sprite, sprite->x, sprite->y + 2, platform, platform->x, platform->y )){ if (sprite_jumping == 1){ sprite_vel_y = sprite_vel_y - sprite_accel; sprite->y = sprite->y - sprite_vel_y; } } if (sprite->y >= 200){ sprite_vel_y = 0; sprite_jumping = 0; //never reset if on tile(at least not with the code shown here) sprite->y = 200; }
anyways, can you show the movement code also.
and finally, just to clarify the problem, once on a tile, you can not move any longer
anyways, if you could show us your movement code, and when collision is detected on a tile code, that'd help.1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
09-24-2008, 01:00 PM #9103
- Registriert seit
- Aug 2008
- Beiträge
- 18
- Points
- 2.361
- Level
- 29
- Downloads
- 0
- Uploads
- 0
This is the movement code..its a side scoller game..
if (osl_keys->held.left)
{
if (!collision(sprite, sprite->x -2, sprite->y, platform, platform->x, platform->y ))// test collision - 2 pixel
{
sprite->x -= 1;
}
}
if (osl_keys->held.right)
{
if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )) // test collision + 2 pixel
{
sprite->x += 1;
}
}
-
09-24-2008, 01:10 PM #9104QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
well their we go=-)
hope this helps, i suggest removing:Code:if (osl_keys->held.left){ if (!collision(sprite, sprite->x -2, sprite->y, platform, platform->x, platform->y )){ sprite->x -= 1; }//think about this if statement...if it's not colliding than move, however if it is....i think you can see where i'm going with this } if (osl_keys->held.right){ if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )){ sprite->x += 1; }//same here }
if (!collision(sprite, sprite->x +2, sprite->y, platform, platform->x, platform->y )){
if your doing this so if you horizontal checking for a collision, i'd suggest changing it so that the collision function returns a number indicating rather it's a vertical collision or a horizontal collision, hope this helps1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
09-24-2008, 01:39 PM #9105
- Registriert seit
- Aug 2008
- Beiträge
- 18
- Points
- 2.361
- Level
- 29
- Downloads
- 0
- Uploads
- 0
ok ill give it a try
-
09-25-2008, 05:23 AM #9106QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
What do i use to blit a string in vsh (4.01)
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-25-2008, 10:33 AM #9107QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Perth, Scotland
- Beiträge
- 1.094
- Points
- 8.475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
09-25-2008, 11:01 AM #9108QJ Gamer Bronze

- Registriert seit
- Jun 2007
- Beiträge
- 232
- Points
- 4.543
- Level
- 42
- Downloads
- 0
- Uploads
- 0
Search at psp-programming.com for VSH Blitter 0.2
-
09-25-2008, 11:10 AM #9109QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Ok got it.
But i got an error:Code:$ make psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/ /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401 -c -o blit.o blit.c blit.c: In function 'blit_setup': blit.c:51: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes integ from pointer without a cast blit.c: In function 'blit_string46': blit.c:141: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes inte from pointer without a cast blit.c: In function 'FillRect': blit.c:263: warning: assignment from incompatible pointer type blit.c:260: warning: unused variable 'vptr0' blit.c: In function 'FillRect2': blit.c:283: warning: assignment from incompatible pointer type blit.c: In function 'Fillvram': blit.c:300: warning: assignment from incompatible pointer type blit.c: In function 'FillvramPlus': blit.c:315: warning: assignment from incompatible pointer type psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/ /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401 -c -o graphics.o graphics.c graphics.c:8:21: error: jpeglib.h: No such file or directory graphics.c:9:20: error: jerror.h: No such file or directory graphics.c:152: warning: 'struct jpeg_decompress_struct' declared inside para er list graphics.c:152: warning: its scope is only this definition or declaration, wh is probably not what you want graphics.c:152: error: parameter 1 ('dinfo') has incomplete type graphics.c: In function 'loadJpegImageImpl': graphics.c:154: warning: implicit declaration of function 'jpeg_read_header' graphics.c:157: warning: implicit declaration of function 'jpeg_start_decompr ' graphics.c:160: warning: implicit declaration of function 'jpeg_destroy_decom ss' graphics.c:177: error: 'JCS_GRAYSCALE' undeclared (first use in this function graphics.c:177: error: (Each undeclared identifier is reported only once graphics.c:177: error: for each function it appears in.) graphics.c:180: warning: implicit declaration of function 'jpeg_read_scanline graphics.c:201: warning: implicit declaration of function 'jpeg_finish_decomp s' graphics.c: In function 'loadJpegImage': graphics.c:209: error: storage size of 'dinfo' isn't known graphics.c:210: error: storage size of 'jerr' isn't known graphics.c:211: warning: implicit declaration of function 'jpeg_std_error' graphics.c:212: warning: implicit declaration of function 'jpeg_create_decomp s' graphics.c:218: warning: implicit declaration of function 'jpeg_stdio_src' graphics.c:219: error: type of formal parameter 1 is incomplete graphics.c:210: warning: unused variable 'jerr' graphics.c:209: warning: unused variable 'dinfo' graphics.c: At top level: graphics.c:227: error: field 'pub' has incomplete type graphics.c:232: error: expected specifier-qualifier-list before 'JOCTET' graphics.c:241: warning: return type defaults to 'int' graphics.c: In function 'METHODDEF': graphics.c:241: error: expected declaration specifiers before 'mem_init_sourc graphics.c:255: error: expected declaration specifiers before 'METHODDEF' graphics.c:289: error: expected declaration specifiers before 'METHODDEF' graphics.c:305: error: expected declaration specifiers before 'METHODDEF' graphics.c:309: error: expected declaration specifiers before 'GLOBAL' graphics.c:338: error: storage class specified for parameter 'PngData' graphics.c:341: error: expected '=', ',', ';', 'asm' or '__attribute__' befor {' token graphics.c:353: error: expected '=', ',', ';', 'asm' or '__attribute__' befor {' token graphics.c:386: error: expected '=', ',', ';', 'asm' or '__attribute__' befor {' token graphics.c:392: error: expected '=', ',', ';', 'asm' or '__attribute__' befor {' token graphics.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' befor {' token graphics.c:526: error: old-style parameter declarations in prototyped functio efinition graphics.c:526: error: expected '{' at end of input make: *** [graphics.o] Error 1[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-25-2008, 11:28 AM #9110QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Perth, Scotland
- Beiträge
- 1.094
- Points
- 8.475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
You're compiling graphics.c under kernel libs?
-
09-25-2008, 11:36 AM #9111QJ Gamer Bronze

- Registriert seit
- Jun 2007
- Beiträge
- 232
- Points
- 4.543
- Level
- 42
- Downloads
- 0
- Uploads
- 0
You must install jpeg lib. Get it from SVN
-
09-26-2008, 04:09 AM #9112QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Hmm,
Code:$ make psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401 -L. -L/usr/local/pspdev/psp/sdk/li b -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/s dk/lib/linkfile.prx -mno-crt0 -nostartfiles main.o blit.o graphics.o /usr/local /pspdev/psp/sdk/lib/prxexports.o -lpspsdk -lpspctrl -lpsppower -lpsprtc -lpspdeb ug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lps pnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o LastTime.elf graphics.o: In function `jpeg_mem_src': graphics.c:(.text+0x118): undefined reference to `jpeg_resync_to_restart' graphics.c:(.text+0x120): undefined reference to `jpeg_resync_to_restart' graphics.o: In function `ReadPngData': graphics.c:(.text+0x2ac): undefined reference to `png_get_io_ptr' graphics.o: In function `loadJpegImageImpl': graphics.c:(.text+0x5ac): undefined reference to `jpeg_read_header' graphics.c:(.text+0x5bc): undefined reference to `jpeg_start_decompress' graphics.c:(.text+0x5ec): undefined reference to `jpeg_destroy_decompress' graphics.c:(.text+0x690): undefined reference to `jpeg_read_scanlines' graphics.c:(.text+0x6b4): undefined reference to `jpeg_finish_decompress' graphics.c:(.text+0x6bc): undefined reference to `jpeg_destroy_decompress' graphics.c:(.text+0x6f4): undefined reference to `jpeg_read_scanlines' graphics.o: In function `loadJpegImage': graphics.c:(.text+0x7ec): undefined reference to `jpeg_std_error' graphics.c:(.text+0x800): undefined reference to `jpeg_CreateDecompress' graphics.c:(.text+0x82c): undefined reference to `jpeg_stdio_src' graphics.c:(.text+0x864): undefined reference to `jpeg_destroy_decompress' graphics.o: In function `loadPngImageImpl': graphics.c:(.text+0x888): undefined reference to `png_create_info_struct' graphics.c:(.text+0x89c): undefined reference to `png_set_sig_bytes' graphics.c:(.text+0x8a8): undefined reference to `png_read_info' graphics.c:(.text+0x8d0): undefined reference to `png_get_IHDR' graphics.c:(.text+0x8fc): undefined reference to `png_destroy_read_struct' graphics.c:(.text+0x978): undefined reference to `png_set_strip_16' graphics.c:(.text+0x980): undefined reference to `png_set_packing' graphics.c:(.text+0x9a8): undefined reference to `png_get_valid' graphics.c:(.text+0x9c0): undefined reference to `png_set_filler' graphics.c:(.text+0xa14): undefined reference to `png_read_row' graphics.c:(.text+0xa84): undefined reference to `png_read_end' graphics.c:(.text+0xa94): undefined reference to `png_destroy_read_struct' graphics.c:(.text+0xac4): undefined reference to `png_set_gray_1_2_4_to_8' graphics.c:(.text+0xad4): undefined reference to `png_set_tRNS_to_alpha' graphics.c:(.text+0xae4): undefined reference to `png_set_palette_to_rgb' graphics.c:(.text+0xb08): undefined reference to `png_destroy_read_struct' graphics.c:(.text+0xb54): undefined reference to `png_destroy_read_struct' graphics.c:(.text+0xb9c): undefined reference to `png_destroy_read_struct' graphics.o: In function `loadImageFromMemory': graphics.c:(.text+0xc04): undefined reference to `jpeg_std_error' graphics.c:(.text+0xc18): undefined reference to `jpeg_CreateDecompress' graphics.c:(.text+0xcb4): undefined reference to `png_create_read_struct' graphics.c:(.text+0xcdc): undefined reference to `png_set_read_fn' graphics.o: In function `loadPngImage': graphics.c:(.text+0xd70): undefined reference to `png_create_read_struct' graphics.c:(.text+0xd88): undefined reference to `png_init_io' collect2: ld returned 1 exit status make: *** [LastTime.elf] Error 1
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-26-2008, 04:57 AM #9113Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
You also need to link -ljpeg -lpng -lz.
Good luck getting that plugin to load with all that bloat :)
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
09-26-2008, 05:09 AM #9114
-
09-26-2008, 05:32 AM #9115QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Ok im really confused right now
Code:$ make psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk /include -O2 -G0 -Wall -D_PSP_FW_VERSION=401 -L. -L/usr/local/pspdev/psp/sdk/li b -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/s dk/lib/linkfile.prx -mno-crt0 -nostartfiles main.o blit.o graphics.o /usr/local /pspdev/psp/sdk/lib/prxexports.o -lpspsdk -lpspctrl -lpsppower -lpsprtc -ljpeg - lpng -lz -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet - lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o LastTime.elf /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libjpeg.a(jerror.o): In function `output_message': jerror.c:(.text+0x224): undefined reference to `_impure_ptr' jerror.c:(.text+0x224): relocation truncated to fit: R_MIPS_GPREL16 against `_im pure_ptr' /usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libjpeg.a(jmemmgr.o): In function `jinit_memory_mgr': jmemmgr.c:(.text+0x77c): undefined reference to `sscanf' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_warning': pngerror.c:(.text+0x14c): undefined reference to `_impure_ptr' pngerror.c:(.text+0x14c): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' pngerror.c:(.text+0x1a8): undefined reference to `_impure_ptr' pngerror.c:(.text+0x1a8): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' pngerror.c:(.text+0x1ac): undefined reference to `_impure_ptr' pngerror.c:(.text+0x1ac): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_error': pngerror.c:(.text+0x2a8): undefined reference to `_impure_ptr' pngerror.c:(.text+0x2a8): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' pngerror.c:(.text+0x310): undefined reference to `_impure_ptr' pngerror.c:(.text+0x310): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o):pngerror.c:(.text+0x314): mor e undefined references to `_impure_ptr' follow /usr/local/pspdev/psp/sdk/lib/libpng.a(pngerror.o): In function `png_error': pngerror.c:(.text+0x314): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrtran.o): In function `png_build_gamma _table': pngrtran.c:(.text+0x1228): undefined reference to `pow' pngrtran.c:(.text+0x1418): undefined reference to `pow' pngrtran.c:(.text+0x14bc): undefined reference to `pow' pngrtran.c:(.text+0x15c0): undefined reference to `pow' pngrtran.c:(.text+0x1694): undefined reference to `pow' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrtran.o):pngrtran.c:(.text+0x1770): mo re undefined references to `pow' follow /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_gAMA ': pngrutil.c:(.text+0xd08): undefined reference to `_impure_ptr' pngrutil.c:(.text+0xd08): relocation truncated to fit: R_MIPS_GPREL16 against `_ impure_ptr' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_cHRM $ pngrutil.c:(.text+0x146c): undefined reference to `_impure_ptr' pngrutil.c:(.text+0x146c): relocation truncated to fit: R_MIPS_GPREL16 against ` _impure_ptr' pngrutil.c:(.text+0x14dc): undefined reference to `_impure_ptr' pngrutil.c:(.text+0x14dc): relocation truncated to fit: R_MIPS_GPREL16 against ` _impure_ptr' /usr/local/pspdev/psp/sdk/lib/libpng.a(pngrutil.o): In function `png_handle_sRGB ': pngrutil.c:(.text+0x178c): undefined reference to `_impure_ptr' pngrutil.c:(.text+0x178c): additional relocation overflows omitted from the outp ut collect2: ld returned 1 exit status make: *** [LastTime.elf] Error 1
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-26-2008, 06:09 AM #9116Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Geändert von Insert_Witty_Name (09-26-2008 um 06:11 AM Uhr) Grund: Automerged Doublepost

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
09-26-2008, 07:20 AM #9117QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Code:$ make psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION= 401 -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/pr xspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nostartfil es main.o blit.o graphics.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lpspsdk -lpspctrl -lpsppower -lpsprtc -ljpeg -lpng -lz -lm -lpspdebug -lpspdisplay -lps pge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolv er -lpsputility -lpspuser -lpspkernel -o LastTime.elf graphics.o: In function `loadPngImageImpl': graphics.c:(.text+0x904): undefined reference to `__iob' graphics.c:(.text+0x910): undefined reference to `__iob' graphics.c:(.text+0xb10): undefined reference to `__iob' graphics.c:(.text+0xb1c): undefined reference to `__iob' graphics.c:(.text+0xb5c): undefined reference to `__iob' graphics.o:graphics.c:(.text+0xb68): more undefined references to `__iob' follow collect2: ld returned 1 exit status make: *** [LastTime.elf] Error 1
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-26-2008, 08:55 AM #9118QJ Gamer Bronze

- Registriert seit
- Jun 2007
- Beiträge
- 232
- Points
- 4.543
- Level
- 42
- Downloads
- 0
- Uploads
- 0
make clean
make
-
09-26-2008, 09:46 AM #9119QJ Gamer Blue
- Registriert seit
- Dec 2007
- Ort
- Netherlands
- Beiträge
- 148
- Points
- 5.672
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Hmmm, its build right now but still with errors:
Code:$ make psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V 401 -c -o main.o main.c main.c: In function 'main_thread': main.c:23: warning: unused variable 'pad' main.c: At top level: blit.h:13: warning: 'vram32' defined but not used psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V 401 -c -o blit.o blit.c blit.c: In function 'blit_setup': blit.c:51: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes i from pointer without a cast blit.c: In function 'blit_string46': blit.c:141: warning: passing argument 4 of 'sceDisplayGetFrameBuf' makes from pointer without a cast blit.c: In function 'FillRect': blit.c:263: warning: assignment from incompatible pointer type blit.c:260: warning: unused variable 'vptr0' blit.c: In function 'FillRect2': blit.c:283: warning: assignment from incompatible pointer type blit.c: In function 'Fillvram': blit.c:300: warning: assignment from incompatible pointer type blit.c: In function 'FillvramPlus': blit.c:315: warning: assignment from incompatible pointer type psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V 401 -c -o graphics.o graphics.c graphics.c: In function 'blitImageToVram': graphics.c:506: warning: assignment from incompatible pointer type graphics.c: At top level: blit.h:13: warning: 'vram32' defined but not used psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_V 401 -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk xspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 -nos es main.o blit.o graphics.o /usr/local/pspdev/psp/sdk/lib/prxexports.o - -lpspctrl -lpsppower -lpsprtc -ljpeg -lpng -lz -lm -lpspdebug -lpspdispl pge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet er -lpsputility -lpspuser -lpspkernel -o LastTime.elf psp-fixup-imports LastTime.elf psp-prxgen LastTime.elf LastTime.prx [email protected] /cygdrive/c/psp/lasttime $
[SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
[i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]
-
09-26-2008, 11:39 AM #9120QJ Gamer Bronze

- Registriert seit
- Jun 2007
- Beiträge
- 232
- Points
- 4.543
- Level
- 42
- Downloads
- 0
- Uploads
- 0
where are the errors?


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