[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Linking custom code to right Freetype version

From: Werner LEMBERG
Subject: Re: [ft] Linking custom code to right Freetype version
Date: Thu, 22 Jun 2017 17:15:51 +0200 (CEST)

> I am working in linux platform. I am changing some code in Freetype and
> looks like they are not applied or linked. Even i tried to comment all the
> code of function FT_Init_FreeType and called it with my application and
> still it worked. I compiled Freetype without errors and than installed it
> via sudo make install that means it should always invoke these freetype
> files, whenever i call it with my application.

I think this problem is not related to FreeType at all; it is rather a
generic problem with dynamic libraries, and you should make yourself
better acquainted with this topic.

`make install' by default installs into `/usr/local'.  I guess your
system is set up so that the dynamic linker looks into `/usr' first.
Since virtually all GNU/Linux platforms come with `libfreetype' in
`/usr', this version will be linked to.  You can use the `ldd' program
to check which dynamic libraries your application is using.

Possible solutions.

  . Ensure that `/usr/local' gets found first by the dynamic linker,
    `'.  Note that this can still be problematic since other
    system DLLs might still depend on libfreetype from `/usr'.

  . Use the LD_PRELOAD environment variable.  This works 100%.
    However, it is suited for testing only.

  . Use static linking.  This works 100%, too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]