forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pspgl-test doesn't compile...

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Thu May 18, 2006 7:13 pm    Post subject: pspgl-test doesn't compile... Reply with quote

hello!! :)

i have installed the latest version of toolchain and it works fine, i have installe d other lib and works.

but pspgl doesn't work!

when i try to compile it give me this cygwin give me this error:

Code:
make: *** No rule to make target '../ligGL.a' needed by 'bezier.elf' Stop


thanks
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Fri May 19, 2006 6:03 am    Post subject: Reply with quote

Check the folder /usr/bin/local/pspdev/psp/libs (it should be somewhere around there... can't remember the exact path as I don't have access to my dev PC right now). Make sure the file ligGL.a is in there. I'm thinking that the lib isn't there.
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Fri May 19, 2006 7:01 pm    Post subject: Reply with quote

Gary13579 wrote:
Check the folder /usr/bin/local/pspdev/psp/libs (it should be somewhere around there... can't remember the exact path as I don't have access to my dev PC right now). Make sure the file ligGL.a is in there. I'm thinking that the lib isn't there.


that lib is in the dir:

C:\cygwin\usr\local\pspdev\psp\lib

but the compiler doesn't find that! why?
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Sat May 20, 2006 6:00 am    Post subject: Reply with quote

Hmm.. post your makefile?
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Sat May 20, 2006 6:28 pm    Post subject: Reply with quote

Code:
ARCH = psp-
CC = $(ARCH)gcc
AS = $(ARCH)as
STRIP = $(ARCH)strip
SIZE = $(ARCH)size
MKSFO = mksfo
PACK_PBP = pack-pbp
FIXUP_IMPORTS = psp-fixup-imports
RM = rm -f

PSPPATH := $(shell psp-config --pspsdk-path)
PSPGL_LFLAGS = -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lpsprtc
CFLAGS = -g -Wall -O2 -MD -I.. -I$(PSPPATH)/include
LFLAGS = -g -Wall -O2 -DMODULE_NAME="$(TARGET)" psp-setup.c -L.. -L$(PSPPATH)/lib $(PSPGL_LFLAGS)

TARGET = bezier
OBJS = simple.o

EXTRA_TARGETS = EBOOT.PBP
BUILDDATE = $(shell date "+%Y/%m/%d %k:%M:%S")
PSP_EBOOT_TITLE = $(TARGET) $(BUILDDATE)
PSP_EBOOT_ICON = NULL
PSP_EBOOT_ICON1 = NULL
PSP_EBOOT_UNKPNG = NULL
PSP_EBOOT_PIC1 = NULL
PSP_EBOOT_SND0 = NULL
PSP_EBOOT_PSAR = NULL

PSPSDK=$(shell psp-config --pspsdk-path)


all: EBOOT.PBP


%.o: %.raw
   (sym=`echo $* | tr '-' '_'`; \
    echo -e ".data\n.global $${sym}_start\n$${sym}_start:\n\t.incbin \"$<\"" | $(AS) -o $@)

%.raw: %.png
   convert -geometry 64x64 $< rgba:$@

.c.o:
   $(CC) $(CFLAGS) -c $<

$(TARGET).elf: $(OBJS) ../libGL.a ../libglut.a
   $(CC) $(OBJS) $(LFLAGS) -o $@

EBOOT.PBP: $(TARGET).elf
   $(FIXUP_IMPORTS) $(TARGET).elf
   $(MKSFO) '$(PSP_EBOOT_TITLE)' $(TARGET).sfo
   $(STRIP) $(TARGET).elf -o $(TARGET)_strip.elf
   @echo -------------------------------------------------------------------------------------
   $(SIZE) $(TARGET)_strip.elf
   @echo -------------------------------------------------------------------------------------
   $(PACK_PBP) EBOOT.PBP $(TARGET).sfo $(PSP_EBOOT_ICON)  \
      $(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1)  \
      $(PSP_EBOOT_SND0)  $(TARGET)_strip.elf $(PSP_EBOOT_PSAR)

install: all $(shell uname)-install

Darwin-install:
   @test -d "/Volumes/PSP STICK/" || \
      echo =========== PSP not connected, not installing =======================================
   @test -d "/Volumes/PSP STICK/"
   @echo ============= image done, now install on PSP ========================================
   rm -f "/Volumes/PSP STICK/log.txt"
   rm -f "/Volumes/PSP STICK/pspgl.ge"
   rm -rf "/Volumes/PSP STICK/PSP/GAME/$(TARGET)"
   mkdir "/Volumes/PSP STICK/PSP/GAME/$(TARGET)"
   cp -v EBOOT.PBP "/Volumes/PSP STICK/PSP/GAME/$(TARGET)/"
   sync

MOUNT=/mnt/stick
DIR=$(MOUNT)/psp/game

Linux-install: EBOOT.PBP
   while [ ! -d $(DIR) ]; do mount $(MOUNT); sleep 1; done
   mkdir -p $(DIR)/$(TARGET)
   mkdir -p $(DIR)/$(TARGET)%
   cp $(TARGET)_strip.elf $(DIR)/$(TARGET)/EBOOT.PBP
   cp EBOOT.PBP $(DIR)/$(TARGET)%/
   umount $(MOUNT)

clean:
   $(RM) *.d *.o *.a *.elf *.sfo EBOOT.PBP

-include $(wildcard *.d) dummy



what can i do?
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Tue May 23, 2006 6:02 am    Post subject: Reply with quote

No idea... do the samples compile?
Or is this one of the samples?
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Tue May 23, 2006 6:24 am    Post subject: Reply with quote

You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Tue May 23, 2006 6:29 pm    Post subject: Reply with quote

hi! i made a little progress but i'm stuck with this...

i have moved the folder "test-bezier" in

C:\cygwin\usr\local\pspdev\psp\sdk\samples\

and included this line in the makefile:

include c:\cygwin\usr\local\pspdev\psp\sdk\lib\build.mak

but i have this error:

Code:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/crt0.o: In function '_main':

/home/user/newtoolchain/pspsdk/src/startup/crt0.c:86: undefined reference to 'main'
collect2: ld returned 1exit status
make: *** [.elf] error 1


what can i do?

i'm very noob with cygwin and makefile because i use visual c++ :) but i want to learn!

good bye!
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Tue May 23, 2006 9:05 pm    Post subject: Reply with quote

Drakonite wrote:
You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...


Do you think this might be because he just doesn't have the path stuff setup properly, if at all? It's a very common problem, and it causes you to mess up your makefile with direct paths to compensate.

If so, I'd suggest him digging up one of the many instructions on setting that up in bash.rc on these forums, as that's what I did and worked best.

Either that, or maybe he did a make in pspgl, but then forgot the make install?
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Wed May 24, 2006 6:39 pm    Post subject: Reply with quote

Arwin wrote:
Drakonite wrote:
You're telling it the target elf requires libGL.a and libglut.a from the parent directory of where the makefile is at... which I'm guessing is very not right ;)

...then you have things like $PSPPATH and such being used...

...and $PSPSDK doesn't seem to be used at all...

Is there a reason you are hacking up a complete custom makefile instead of using one based on build.mak like the template? ...


Do you think this might be because he just doesn't have the path stuff setup properly, if at all? It's a very common problem, and it causes you to mess up your makefile with direct paths to compensate.

If so, I'd suggest him digging up one of the many instructions on setting that up in bash.rc on these forums, as that's what I did and worked best.

Either that, or maybe he did a make in pspgl, but then forgot the make install?


i found how to set up bash.rc and make it, and i don't forgot to make install the pspgl but i doesn't work... :(
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
dark_zarkon



Joined: 11 Jan 2006
Posts: 26

PostPosted: Fri Jun 02, 2006 12:14 am    Post subject: Reply with quote

i have solved my problem!!

now i can compile with pspgl, reinstalled cygwin, toolchain, and lib...

now i must solve the problem with sdl...
_________________
i'm italian...
forgive me for my english! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group