Hi all:
I tried to create a shared lib from the file FTGLFromC.cpp and succeeded in doing so.
But when trying to load the new libftglint.so (for "FTGL Interface") I see the following error in ACL62Trial on Linux:
; Loading /home/frgo/projects/cello/ftgl-int/libftglint.so.1 Error: Attempt to take the value of the unbound variable ^?ELF^A^A^A ... [condition type: UNBOUND-VARIABLE]
So I decided to check if the lib is valid in its format. I put togehter a simple main.cpp file:
--X-- #include <stdio.h> #include <dlfcn.h>
#include "FTGLTextureFont.h" #include "FTTextureGlyph.h"
#define LIBFTGLINT "/home/frgo/projects/cello/ftgl-int/libftglint.so.1" #define FONT "Verdana"
extern "C" {
int main( int argc, char **ppcArgv ) { int nRC = 0; void *pvHandle = NULL; char *pcError = NULL;
/* FTGLTextureFont *psTextureFont = NULL; */ void *psTextureFont = NULL;
typedef void* (*fgcTextureMakeSymPtr)(const char *);
fgcTextureMakeSymPtr fgcTextureMakeFRGO = NULL; void *fgcTextureMake = NULL;
pvHandle = dlopen( LIBFTGLINT, RTLD_LAZY ); if( pvHandle == NULL ) { fprintf(stderr, "%s !\n", dlerror()); nRC = 1; }
if( nRC == 0 ) { fgcTextureMake = dlsym( pvHandle, "fgcTextureMake" ); if(( pcError = dlerror()) != NULL ) { fprintf( stderr, "%s !\n", pcError ); nRC = 1; }
if( nRC == 0 ) { fgcTextureMakeFRGO = (fgcTextureMakeSymPtr) fgcTextureMake; psTextureFont = (*fgcTextureMakeFRGO)( FONT ); printf("psTextureFont = %x\n", psTextureFont ); }
dlclose( pvHandle ); }
return nRC; }
} /* extern "C" */
--X--
and when running the resulting little program I actually get a valid address for the texture font pointer. This clearly shows that building the shared lib succeeded.
In ACL62Trial I get this error whenever I try to load a shared lib that has some C++ object files in it. I double checked on the right compile options and flags...
Any ideas? I couldn't find anything on Franz's WWW pages and also googling didn't reveal something.
Thx for feedback!
Regards, Frank
I cannot help directly, but two thoughts:
1. my understanding is that Franz will consider tech support questions like this from trial users. Especially since you covered the bases and tried it from C and it worked. If not, maybe they will take the question from me since I am licensed on win32 and they like me because I am always talking them up on c.l.l. :)
2. If this looks like the only problem, two workarounds (as much as I dig FTGL):
a. PortaGlut will use the very limited Glut fonts. That would suck, but at least it gets the thing ported with fonts left as an open item.
b. ImageMagick documentation mentions FreeType support. Not sure how extensive or how efficient this will be, but texture fonts are the fastest and most flexible of even the FTGL fonts, so I think this would be a fine compromise.
Let me get my PortaGlut thing out, then I will do a CelloGlut release (no FTGL or ImageMagick) using just the Glut fonts, then I'll do a CelloMagick add-on, etc etc.
kt