[cells-devel] PortaGLUT: FTGLFromC.cpp: Cannot load C++ object file into ACL6.2

Frank Goenninger frank_goenninger at t-online.de
Mon Feb 23 21:48:48 UTC 2004


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20040223/82dd538f/attachment.sig>


More information about the cells-devel mailing list