Weird compile errors I'm getting (unrar related)

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

Moderators: cheriff, TyRaNiD

Post Reply
nEcRo64x
Posts: 1
Joined: Thu Apr 24, 2008 2:54 am

Weird compile errors I'm getting (unrar related)

Post by nEcRo64x »

I was wondering if someone has run across this. I am trying to compile the unrarlib part of the PSP found here.

When I try to compile it I get this error:

Code: Select all

$ make -f Makefile.psp
psp-g++ -O0 -g3 -G0 -fno-rtti -I/usr/local/pspdev/psp/sdk/include -D_FILE_OFFSET
_BITS=64 -D_LARGEFILE_SOURCE -DRARDLL -DSILENT -c rar.cpp
find.hpp:37: error: ISO C++ forbids declaration of 'DIR' with no type
find.hpp:37: error: expected ';' before '*' token
model.hpp:107: warning: 'packed' attribute ignored for field of type 'SEE2_CONTE
XT [25][16]'
model.hpp:107: warning: 'packed' attribute ignored for field of type 'SEE2_CONTE
XT'
make: *** [rar.o] Error 1
The toolchain I am using was built in January 2008. I am using cygwin. Here is the weird thing, on my laptop I have an old toolchain from 2006 and it compiles with no problems.

Here is the make file for reference:

Code: Select all

#
# Makefile for PSP library - unrar
#

# Linux using GCC
CXX=psp-g++
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CXXFLAGS=-O0 -g3 -G0 -fno-rtti -Wno-deprecated \
	-I$(shell psp-config --psp-prefix)/sdk/include $(DEFINES)
AR=psp-ar

##########################

COMPILE=$(CXX) $(CXXFLAGS)
LINK=$(CXX)

LIB_OBJ=filestr.o scantree.o dll.o

OBJECTS=rar.o strlist.o strfn.o pathfn.o int64.o savepos.o global.o file.o filefn.o filcreat.o \
	archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \
	resource.o match.o timefn.o rdwrfn.o consio.o options.o ulinks.o errhnd.o rarvm.o \
	rijndael.o getbits.o sha1.o extinfo.o extract.o volume.o list.o find.o unpack.o cmddata.o

.cpp.o:
	$&#40;COMPILE&#41; -D$&#40;WHAT&#41; -c $<

all&#58;	lib

clean&#58;
	@rm -f *.o *.bak *~

lib&#58;	WHAT=RARDLL -DSILENT
lib&#58;	$&#40;OBJECTS&#41; $&#40;LIB_OBJ&#41;
	@rm -f libpspunrar.a
	$&#40;AR&#41; rcs libpspunrar.a $&#40;OBJECTS&#41; $&#40;LIB_OBJ&#41;
Any ideas? I am not really an expert on gcc, make, etc. I know I can just compile the lib on my laptop and transfer it over, but I would rather not do that because I plan to do some work on it to optimize it more for PSP. So if there is a simple solution to getting it to compile on my PC I would be very greatful.Thank you for the help.
Post Reply