Author Topic: Compiling libraries for gcw0  (Read 1733 times)

David Knight (OP)

  • Posts: 577
Compiling libraries for gcw0
« on: September 14, 2014, 08:06:59 pm »
I'm trying to compile wesnoth for gcw0. It needs libfontconfig which I can compile for gcw. The problem is that I don't know how to link the compiled .la file with wesnoth.

I understand that I should create a static library (.a) as opposed to a shared library (.so). Is this correct?
If so, how do you use libtools to do this?  When I check the .libs directory it contains no .a files, only .la and .so.
I've tried googling and am struggling to understand how to do this.

Sorry for this noob developer question but it's stopping me from compiling a number of apps!


  • Posts: 1673
    • My devblog
Re: Compiling libraries for gcw0
« Reply #1 on: September 15, 2014, 08:36:10 am »
Just compile fontconfig and install it inside the toolchain:
Code: [Select]
./configure --prefix=/usr --host=mipsel-linux
make install DESTDIR=/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot

Then you will be able to compile programs that use it.
I don't recommend to compile statically, it's generally not a good idea. Instead, you can put the .so of the libraries you just compiled in the OPK if they are not already in the rootfs, and set the library search path accordingly on the Exec line of your .desktop:
Code: [Select]
Exec=env LD_LIBRARY_PATH=. ./myapp

David Knight (OP)

  • Posts: 577
Re: Compiling libraries for gcw0
« Reply #2 on: September 15, 2014, 09:52:41 pm »
Thanks, this works great  ;D


  • Posts: 128
Re: Compiling libraries for gcw0
« Reply #3 on: September 16, 2014, 05:59:24 pm »
wesnoth?!!! Sweeet!  :)


Post a new topic