mkoctfile: undefined reference to `XOpenDisplay'
Jaroslav Hajek
highegg at gmail.com
Tue May 19 04:49:10 CDT 2009
On Mon, May 18, 2009 at 12:36 PM, David Grundberg <c04dgg at cs.umu.se> wrote:
> Bug report for Octave 3.1.55 (9211:f0c3d3fc4903) configured for
> i686-pc-linux-gnu
>
> Description:
> -----------
>
> * I'm unable to get mkoctfile to create output with default
> options. Using 9211:f0c3d3fc4903.
>
> Repeat-By:
> ---------
>
> * ./configure --prefix /opt/octave-head -C
> make
> make install
>
> cat > helloworld.cc << EOF
> #include <octave/oct.h>
>
> DEFUN_DLD (helloworld, args, nargout,
> "Hello World Help String")
> {
> int nargin = args.length ();
> octave_stdout << "Hello World has " << nargin
> << " input arguments and "
> << nargout << " output arguments.\n";
> return octave_value_list ();
> }
> EOF
> export PATH=/opt/octave-head/bin:$PATH
> mkoctfile helloworld.cc --link-stand-alone
>
> * I'm expecting mkoctfile to produce a runnable executable, but it
> will not. These are the messages from mkoctfile:
>
> /opt/octave-head/lib/octave-3.1.55/liboctinterp.so: undefined reference
> to `XOpenDisplay'
> /opt/octave-head/lib/octave-3.1.55/liboctinterp.so: undefined reference
> to `XScreenNumberOfScreen'
> collect2: ld returned 1 exit status
>
> Fix:
> ---
>
> * As a work-around, I can export LDFLAGS=-lX11 while running
> mkoctfile. That way it will produce a runnable a.out.
>
>
Please try the following patch (or just pull from savannah archive):
http://hg.savannah.gnu.org/hgweb/octave/rev/0839df1694ae
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list