Hi,

I'm using the Inline module and trying to link to several (3) shared
libraries in my development directory along with
a multitude of other shared libraries.  Since I use automake in my c
program it creates a libtool script to do just this and in c it works
fine.  Now I think I want to use the same tool to link from perl so
I set

  LD => "/bin/sh $Vis5D::home/libtool --mode=link \$(CC)",

The following package does just about all the right things, but it puts
the resulting .so file in
_Inline/lib/auto/Vis5D_648c/.libs
Then trys to link in a file in _Inline/lib/auto/Vis5D_648c which gives
the error:
invalid ELF header at /usr/lib/perl5/5.6.0/i386-linux/DynaLoader.pm line
200.  Which makes sense because that file is just a script.

How do I get MakeMaker/Inline to do the right thing?  Or am I doomed to
reinstall my c code everytime I want to run a new test?


Thanks,
Jim


package Vis5D;
use strict;
use warnings;

BEGIN{
  # Get the gtk libs
  $Vis5D::gtklibs = `gtk-config --libs`;
  chomp($Vis5D::gtklibs);

  # Get the gtk includes
  $Vis5D::gtkincs = `gtk-config --cflags`;
  chomp($Vis5D::gtkincs);

  # Get the root directory for my tests
  $Vis5D::home="/home/jedwards/vis5d+";
}

use Inline C =>
  Config => ENABLE => AUTOWRAP =>
  LIBS=>"$Vis5D::gtklibs -lgtkgl -lGLU -lGL",
  MYEXTLIB => "$Vis5D::home/src.vis5d/libvis5d.la
$Vis5D::home/src.vis5d/libv5d.la $Vis5D::home/src.gtk/libv5dgtk.la",
  INC => "$Vis5D::gtkincs -I/home/jedwards/vis5d+/src.gtk",
  LD => "/bin/sh $Vis5D::home/libtool --mode=link \$(CC)",
  AUTO_INCLUDE => "#include <gtk/gtk.h>\n#include <interface.h>",
  TYPEMAPS => "$Vis5D::home/typemap";

use Inline C => q{GtkWidget * create_window3D (); };

Reply via email to