[Bf-committers] [Patch] Add support for using (dynamically) system-wide FTGL libraries.

Cyril Brulebois kibi at debian.org
Sat May 3 10:50:45 CEST 2008


Hi,

until now, I've been using the embedded FTGL libraries, but for the
usual reasons, I've changed it to use the system-wide ones. Building
statically against them is OK, but it's not possible to link
dynamically:
| Linking program ==> 'blender'
| build/linux2/lib/libbf_ftfont.a(FTF_TTFont.o): In function `FTF_TTFont::SetFont(unsigned char const*, int, int)':
| FTF_TTFont.cpp:(.text+0x8bd): undefined reference to `FTPixmapFont::FTPixmapFont(char const*)'
| FTF_TTFont.cpp:(.text+0x8d1): undefined reference to `FTFont::Error() const'
| FTF_TTFont.cpp:(.text+0x90d): undefined reference to `FTPixmapFont::FTPixmapFont(char const*)'
| FTF_TTFont.cpp:(.text+0x930): undefined reference to `FTPixmapFont::FTPixmapFont(char const*)'
| FTF_TTFont.cpp:(.text+0xa30): undefined reference to `FTPixmapFont::FTPixmapFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xa60): undefined reference to `FTPixmapFont::FTPixmapFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xa8a): undefined reference to `FTPixmapFont::FTPixmapFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xb01): undefined reference to `FTTextureFont::FTTextureFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xb15): undefined reference to `FTFont::Error() const'
| FTF_TTFont.cpp:(.text+0xb54): undefined reference to `FTTextureFont::FTTextureFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xb7e): undefined reference to `FTTextureFont::FTTextureFont(unsigned char const*, unsigned int)'
| FTF_TTFont.cpp:(.text+0xbc1): undefined reference to `FTTextureFont::FTTextureFont(char const*)'
| FTF_TTFont.cpp:(.text+0xbe9): undefined reference to `FTTextureFont::FTTextureFont(char const*)'
| FTF_TTFont.cpp:(.text+0xc0c): undefined reference to `FTTextureFont::FTTextureFont(char const*)'
| collect2: ld returned 1 exit status
| scons: *** [build/linux2/bin/blender] Error 1
| scons: building terminated because of errors.

Please find attached a patch to add support for BF_FTGL_LIB where (as
far as I understand it) it belongs.

As a side note, I had to add a GL/gl.h include to have Blender compiled
against ftgl 2.1.3 rc1. I guess they cleaned up header inclusions.

Mraw,
KiBi.
-------------- next part --------------
--- a/source/blender/ftfont/intern/FTF_TTFont.cpp
+++ b/source/blender/ftfont/intern/FTF_TTFont.cpp
@@ -41,6 +41,8 @@
 #include "BKE_utildefines.h"
 #endif
 
+#include <GL/gl.h>
+
 #define DOMAIN_NAME "blender"
 
 #define SYSTEM_ENCODING_DEFAULT "UTF-8"
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -165,6 +165,8 @@
         syslibs += Split(lenv['BF_OPENGL_LIB'])
     if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross'):
         syslibs += Split(lenv['BF_PTHREADS_LIB'])
+    if lenv['WITH_BF_FTGL']:
+        syslibs += Split(lenv['BF_FTGL_LIB'])
 
     syslibs += Split(lenv['LLIBS'])
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.blender.org/pipermail/bf-committers/attachments/20080503/0875e0cd/attachment.pgp 


More information about the Bf-committers mailing list