library error (-losl)

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

Moderators: cheriff, TyRaNiD

Post Reply
razorrifh
Posts: 23
Joined: Sat Jun 04, 2005 2:15 am
Location: Penn State
Contact:

library error (-losl)

Post by razorrifh »

hey, i'm new to console programming for the most part (played around with xbox for a bit but got bored). i'm having a bit of a time using the OldSchool Library (OSLib). i have it installed and such but when i compile the test application i get a long error that ends in this:
../psp/bin/ld: cannot find -losl
collect2: ld returned 1 exit status
and here is my make file:
TARGET = test
OBJS = test.o
YOURLIBS=

INCDIR =
CFLAGS = -G4 -Wall -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =

LIBS=$(STDLIBS)$(YOURLIBS)
LDFLAGS =

STDLIBS= -losl -lpng -lz \
-lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm


EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = OSL Sample

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
i dont know much about make/cygwin (or linux for that matter) but i'm assuming its a problem linking it because it cant find the appropriate library. any help would be appreciated. thanks. :)

ps, i would have searched google on this but there is no info on there for oslib yet (too new and noone's using it yet?), and im not even sure what the problem is in regards to the "-losl" error message so dunno what to search for. thanks again.
choupette
Posts: 7
Joined: Wed Oct 12, 2005 7:46 pm

Post by choupette »

if -losl is not find, it means gcc doesn't find libosl in the library path you gave it. note, that I didn't say you don't have libosl, I'm just saying that given the library path it is given, it didn't find it.

you should google or man gcc if you want further explanations as it's a very basic problem.
razorrifh
Posts: 23
Joined: Sat Jun 04, 2005 2:15 am
Location: Penn State
Contact:

Post by razorrifh »

ok, thanks for your help. i'll try searchin for gcc info now. :)


edit (2 hours later, heh): ok just to let everyone know how i fixed it that might be as noobish as me...

the libosl installer script tried to copy the files here:
C:\cygwin\usr\local\pspdev\lib
but they needed to be here:
C:\cygwin\usr\local\pspdev\psp\sdk\lib
Post Reply