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