[Vm-dev] how to add FTPlugin

Levente Uzonyi leves at elte.hu
Mon Jan 25 01:52:11 UTC 2010


On Sun, 24 Jan 2010, laurent laffont wrote:

> If the plugin is configured as external, it's not loaded when I run last 
> pharo image. I don't know if I need to explicitly load a plugin (and how
> ?).
> 
> If I put the plugin as internal, linking fails:
> Linking C executable squeakvm                                           
>   
> FT2Plugin/libFT2Plugin.a(FT2Plugin.c.o): In function 
> `primitiveGetFaceCharIndex':                                   
> /home/lol/sandbox/pharo/vmmaker/Squeak-3.11.3.2135-src/unix/src/vm/intplugins/FT2Plugin/FT2Plugin.c:666: 
> undefined reference to `FT_Get_Char_Index'
>                                                                         
>           
> FT2Plugin/libFT2Plugin.a(FT2Plugin.c.o): In function 
> `primitiveNewMemoryFaceFromExternalMemoryAndIndex':            
> /home/lol/sandbox/pharo/vmmaker/Squeak-3.11.3.2135-src/unix/src/vm/intplugins/FT2Plugin/FT2Plugin.c:1448: 
> undefined reference to
> `FT_New_Memory_Face' 
> 
> I suppose it does not find  libfreetype.so (which is in 
> /usr/lib/libfreetype.so on my machine) ? I don't know how to specify lib 
> path with squeak
> build process...

I created a directory named FT2Plugin in platforms/unix/plugins, then 
created a file there named config.cmake .
The file contains the following line:
PLUGIN_FIND_LIBRARY(FT2 freetype)

This adds a check for the library and uses it while linking. I built the 
plugin as external and it works on ubuntu 9.04.


Levente


More information about the Vm-dev mailing list