[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with an oct file that won't load
From: |
John Swensen |
Subject: |
Problem with an oct file that won't load |
Date: |
Thu, 23 Oct 2008 10:03:26 -0400 |
I have a problem where linking GTK libraries into an OCT file prevents
it from loading properly in Octave. I am using the latest from HG (as
of last night) on OSX 10.5. I do know for a fact that this does work
on Ubuntu Linux 8.04.
PROGRAM (testfunc.cc)
---------------
#include <octave/oct.h>
#include<iostream>
using namespace std;
DEFUN_DLD (testfunc, args, , "")
{
return octave_value();
}
COMPILE COMMANDS
---------------------------------
1) mkoctfile -v -o testfunc.oct testfunc.cc
2) mkoctfile -v -o testfunc.oct `pkg-config --cflags gtk+-2.0
gtkgl-2.0 gtkmm-2.4` -L`pkg-config --libs gtk+-2.0 gtkgl-2.0
gthread-2.0 gtkmm-2.4` testfunc.cc
If I compile using (1), then everything works as expected
If I compile using (2), I get the following error when trying to run
the function: error: "couldn't link module /Users/jpswensen/src/
gtkmmhandles/testfunc.oct"
I looked in the sources for liboctave concerning how OSX loads oct
files (in oct-shlib.cc), but I don't have enough knowledge about how
NSLinkModule works and how to find out a more specific error. As you
can see, my DLD function actually has no dependence on GTK so it is
somehow just the linking process (I think).
Any suggestions on debugging this problem?
John Swensen
- Problem with an oct file that won't load,
John Swensen <=
- Problem with an oct file that won't load, John W. Eaton, 2008/10/23
- Re: Problem with an oct file that won't load, John Swensen, 2008/10/23
- Re: Problem with an oct file that won't load, John W. Eaton, 2008/10/23
- Re: Problem with an oct file that won't load, John W. Eaton, 2008/10/23
- Re: Problem with an oct file that won't load, John Swensen, 2008/10/23
- Re: Problem with an oct file that won't load, John W. Eaton, 2008/10/23
- Re: Problem with an oct file that won't load, John Swensen, 2008/10/23
- Re: Problem with an oct file that won't load, John W. Eaton, 2008/10/23
- Re: Problem with an oct file that won't load, John Swensen, 2008/10/23
- Re: Problem with an oct file that won't load, John W. Eaton, 2008/10/23