From owner-FreeBSD-users-jp@jp.freebsd.org  Sat Jul 12 03:33:55 1997
Received: by jaz.jp.freebsd.org (8.8.6+2.7Wbeta5/8.7.3) id DAA07905
	Sat, 12 Jul 1997 03:33:55 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.6+2.7Wbeta5/8.7.3) with SMTP id DAA07900
	for <freebsd-users-jp@jp.freebsd.org>; Sat, 12 Jul 1997 03:33:53 +0900 (JST)
Received: from fsunm (localhost.bpe.es.osaka-u.ac.jp [127.0.0.1]) by fsunm.bpe.es.osaka-u.ac.jp (8.6.12+2.4W/3.3Wb95051115) with ESMTP id DAA00666 for freebsd-users-jp@jp.freebsd.org; Sat, 12 Jul 1997 03:33:52 +0900
Message-Id: <199707111833.DAA00666@fsunm.bpe.es.osaka-u.ac.jp>
To: FreeBSD-users-jp@jp.freebsd.org
In-Reply-To: Your message of "Sat, 12 Jul 1997 01:55:17 +0900"
References: <199707111655.BAA02041@tatsu.kane.shimosuwa.nagano.jp>
X-Mailer: Mew version 1.68 on Emacs 19.28.1 / Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Date: Sat, 12 Jul 1997 03:33:51 +0900
From: OKAZAKI Tetsurou <okazaki@bpe.es.osaka-u.ac.jp>
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 15724
Subject: [FreeBSD-users-jp 15724] Re: [Q] octave dose not exec .oct function.
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$B2,:j!w:eBg$G$9!%(B

In Message-ID: <199707111655.BAA02041@tatsu.kane.shimosuwa.nagano.jp>
  Hideki KANEBAKO <kane@kane.shimosuwa.nagano.jp> writes:

> octave 2.0.8 $B$r(B 2.2.1 or 2.2.2 box $B$K%$%s%9%H!<%k$7$?$N$G$9$,!"%@%$%J(B
> $B%_%C%/%m!<%@%V%k%U%!%s%/%7%g%s(B xxx.oct $B$,<B9T$G$-$:$K:$$C$F$$$^$9!#(B
> 
> examples $B$N(B hello.cc $B$r(B mkoctfile $B$K$F(B hello.oct $B$K%3%s%Q%$%k$7$F!"(B
> hello.cc $B$N%3%a%s%H$K$"$k$h$&$K<B9T$9$k$H!"(B
> 
> error: unable to link function `FShello__Fv'
> error: `hello' undefined near line 1 column 1
> error: evaluating expression near line 1, column 1
> 
> $B$H$$$o$l$F$7$^$$$^$9!#(B
> 
> octave $B$O(B ports $B$G%3%s%Q%$%k$7$^$7$?!#$b$A$m$s!"(B
> octave_config_info("dld") $B$O(B 1 $B$G$9!#(B
> 
> ports $B$G$J$/$F!"(Bconfigure --enable-shared --enable-dl $B$G(B make $B$7$F$b7k(B
> $B2L$OF1$8$G$7$?!#(B

dlopen()$B$O@.8y$7$F!$(Bdlsym()$B$G<:GT$7$F$$$k$_$?$$$G$9$M!%(B

$B;d$,IaCJ$5$o$C$F$$$k$N$O:#$@$K(BFreeBSD 2.1.5R$B$J$N$G!$(B
$B$^$?!$A02s$NMM$K30$l$?%3%a%s%H(B($B$9$$$^$;!A$s(B^^;)$B$r(B
$B$7$F$7$^$&$+$b$7$l$^$;$s$,!$$b$7(B2.2$B7OE}$H(B2.1$B7OE}$G(B
$B4X?t(Bsymbol$BL>$N(Bmangling$BJ}K!$,JQ2=$7$F$$$J$$$J$i!$(B
octave$B$N(Bsrc/dynamic-ld.cc $B$N2<$N$H$3$m(B

------------------------------------------------
#if defined (WITH_DYNAMIC_LINKING)

// XXX FIXME XXX -- need to provide some way to ensure that functions
// that we are going to use will use the same naming convention as
// Octave's internal functions.  It needs to be simpler than the
// current DEFUN_DLD() macro, which assumes you know how to name the
// function, the struct, and the helper function.

static string
mangle_octave_oct_file_name (const string& name)
{
  string retval ("FS");
  retval.append (name);
  retval.append ("__Fv");
  return retval;
}
--------------------------------------------------

 $B$K$"$k!$(Bstring retval ("FS");
 $B$r(B      string retval ("_FS");

 $B$KJQ$($F$_$k$H<!$K?J$`$+$b$7$l$^$;$s!%(B
 $B7k2L$r$<$R65$($F$/$@$5$$(B.

p.s.
 ports$B$r;H$o$J$$>l9g$K(B2.2.1$B$N4D6-$G(Bmake$B$G$-$F!$(B
 2.2.2$B$@$H<:GT$9$k$H$$$&$N$O!$(Bc++$B%3%^%s%I$,(B
 $B%j%s%/F0:n;~$K(Blibstdc++$B$r<+F0E*$K%j%s%/$9$k(B
 $BMM$K$J$C$F$$$k$+$I$&$+$K0c$$$,$"$k$+$i$G$O(B
 $B$J$$$+$H$$$&5$$,$7$^$9!%K\2H(BWeb cite$B$+$i$?$I$l$k(B
 CVS$B$N(Bchange log(contrib/gcc/cp/g++.c)$B$r$_$F$_$k$H(B
 $B$3$3$i$X$s$O2a5n$KJQF0$,$$$m$$$m$"$C$?$=$&$G$9$,(B...

---
$B2,:j(B $BE/O/(B   okazaki@bpe.es.osaka-u.ac.jp


