Compiling problem in DevC++

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

Moderators: cheriff, TyRaNiD

Post Reply
Mr.Modem
Posts: 28
Joined: Wed Sep 21, 2005 4:43 am

Compiling problem in DevC++

Post by Mr.Modem »

I've istalled the sdk using the toolchain.sh script and successfully compiled a few apps using cygwin. It works fine but I want to switch to DevC++. I've done what the stickied tutorial says but it doesn't work. Heres my makefile:

Code: Select all

TARGET = Test
OBJS = main.o 

INCDIR =
CFLAGS = -O2 -G0 -Wall -I"C:\cygwin\usr\local\pspdev\psp\sdk\include"
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK= C:\cygwin\usr\local\pspdev\psp\sdk
include $(PSPSDK)/lib/build.mak
and the compile log:

Code: Select all

Compiler: PSP
Executing  make clean
rm -f Test.elf main.o  PARAM.SFO EBOOT.PBP EBOOT.PBP
psp-gcc -I. -IC:\cygwin\usr\local\pspdev\psp\sdk/include -O2 -G0 -Wall -I "C:\cygwin\usr\local\pspdev\psp\sdk\include"   -c -o main.o main.c
psp-gcc -I. -IC:\cygwin\usr\local\pspdev\psp\sdk/include -O2 -G0 -Wall -I "C:\cygwin\usr\local\pspdev\psp\sdk\include"  -L. -LC:\cygwin\usr\local\pspdev\psp\sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspuser -lpspkernel -o Test.elf
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/bin/ld: cannot find -lpspdebug
collect2: ld returned 1 exit status
make: *** [Test.elf] Error 1
Execution terminated
I've must have done something really stupid. Please help.
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

looks like the path to the libraries is being set incorrectly:

Code: Select all

-LC:\cygwin\usr\local\pspdev\psp\sdk/lib
whats the bet that the forward slash as directory seperator is breaking something?

Try looking thru $(PSPSDK)/lib/build.mak and change the / to a \.
failing that, as least make sure that libpspdebug.a is actually in C:\cygwin\usr\local\pspdev\psp\sdk/lib ...
Damn, I need a decent signature!
Mr.Modem
Posts: 28
Joined: Wed Sep 21, 2005 4:43 am

Post by Mr.Modem »

I changed build.mak but it still doesn't work.

Code: Select all

Compiler: PSP
Executing  make clean
rm -f Test.elf main.o  PARAM.SFO EBOOT.PBP EBOOT.PBP
psp-gcc -I. -IC:\cygwin\usr\local\pspdev\psp\sdk\include -O2 -G0 -Wall -I"C:\cygwin\usr\local\pspdev\psp\sdk\include"   -c -o main.o main.c
psp-gcc -I. -IC:\cygwin\usr\local\pspdev\psp\sdk\include -O2 -G0 -Wall -I"C:\cygwin\usr\local\pspdev\psp\sdk\include"  -L. -LC:\cygwin\usr\local\pspdev\psp\sdk\lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspuser -lpspkernel -o Test.elf
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/bin/ld: cannot find -lpspdebug
collect2: ld returned 1 exit status
make: *** [Test.elf] Error 1
Execution terminated
libpspdebug.a is in the C:\cygwin\usr\local\pspdev\psp\sdk\lib directory.
Mr.Modem
Posts: 28
Joined: Wed Sep 21, 2005 4:43 am

Post by Mr.Modem »

Ok, I solved the problem. I just replaced the makefile with a make file from the sdk samples. I know the make kxploit command makes 1.5 eboots. Can I do the same from DevC++. I'm sorry if this have been asked before. I've searched the forums but didn't find anything
Post Reply