Shared Libraries


Kramy

Active Member
Joined
Mar 15, 2008
Messages
688
Hello again. I'm back with more newbie questions. :lol:

I'm trying to compile Rlyeh's Minimal Library - but rather than using it in a static linked .gpe, I'm trying to turn it into a shared library(.so). It keeps spitting out this error, and I'm not sure why. (I'm using the Code::Blocks project's toolchain)

.gpe files compile fine. Is it because I have a space in the path? I'm inclined to think not, since it's referring to the whole path and not "f:\programming".

All the folders are where they're supposed to be, so why can't it find /usr/lib/? :huh:

Looks like this guy had the same problem.

-Kramy


Edit: Moved devkitGP2X folder to G:\ - same error - help!


compilesharedlibrarysx5.png

CODE
@ECHO OFF
IF EXIST *.so DEL *.so
ECHO Compiling Minimal Library
arm-linux-gcc -shared -o rlib.so minimal.c -lpthread -lm

PAUSE
 
Last edited by a moderator:
You are using the ancient (gcc 2.95) GPH toolchain, right? Its the only one that can compile shared libraries that work with the old linux kernel on the GP2X.
 
Blah said:
You are using the ancient (gcc 2.95) GPH toolchain, right? Its the only one that can compile shared libraries that work with the old linux kernel on the GP2X.

Nope. Didn't know that. :D

But regardless, it's still having a problem finding the dir, and someone else had that problem too. ;)

I'll try the old toolchain.
 
Last edited by a moderator:
Kramy said:
Blah said:
You are using the ancient (gcc 2.95) GPH toolchain, right? Its the only one that can compile shared libraries that work with the old linux kernel on the GP2X.

Nope. Didn't know that. :D

But regardless, it's still having a problem finding the dir, and someone else had that problem too. ;)

I'll try the old toolchain.
i find that sometimes, compile tools don't like spaces in the working path's name -> f:\programming tools\. maybe try it in a path without spaces, sometimes it works.
 
Last edited by a moderator:
Sebastian said:
i find that sometimes, compile tools don't like spaces in the working path's name -> f:\programming tools\. maybe try it in a path without spaces, sometimes it works.
I stated in the first post I already tried that. Same error. ;)
 
Last edited by a moderator:
/usr/lib is the common place in Linux to look for shared libs. Since you are using Windows, you have a big configuration problem somewhere :) Look in your Makefile and in arm-linux-sdl-config (.bat?) for strange paths.

Anyway, why d'you need a shared library? As far as I know the Rlyeh's library doesn't come with any firmware, so your game won't work without preinstalling the library. Besides, in order to get rid of the multiple library/firmware versions, static links are preferred to develop for the Gp2x.
 
juanvvc said:
/usr/lib is the common place in Linux to look for shared libs. Since you are using Windows, you have a big configuration problem somewhere :) Look in your Makefile and in arm-linux-sdl-config (.bat?) for strange paths.

Anyway, why d'you need a shared library? As far as I know the Rlyeh's library doesn't come with any firmware, so your game won't work without preinstalling the library. Besides, in order to get rid of the multiple library/firmware versions, static links are preferred to develop for the Gp2x.
Need to know how for a different project. Rlyeh's library just happened to be a large chunk of working C code to mess with - and it could be handy, actually, for a GP2X project I'd like to start.

But before I can start it, I need to figure out how to compile a shared library. ;)

Could win32 paths using backslashes be the cause it can't find "/usr/lib/"? I'll try compiling under linux, I suppose.
 
Last edited by a moderator:
Either that, or you could modify the makefile to use the right paths for Windows...Don't ask me how, I'd have to delve deep into the code and reinstall some stuff and tons of other crap to find out and I'm not about to do that.
 
Back
Top