From bug-octave-request at bevo dot che dot wisc dot edu Thu Nov 12 16:28:01 1998 Subject: DLD function: the first call produces error message, but the second call is fine From: "John W. Eaton" To: Suttipan Limanond Cc: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 12 Nov 1998 16:27:18 -0600 (CST) On 12-Nov-1998, Suttipan Limanond wrote: | To: bug-octave at bevo dot che dot wisc dot edu | Cc: limanond | Subject: DLD function: the first call produces error message, but the second call is fine | | Bug report for Octave 2.0.13 configured for i386-unknown-freebsd | | Description: | ----------- | | The first call to a (any) user-defined DLD function flags an error. | But the consecutive call gives the right answer. The OCTAVE-defined | DLD's work fine. | | Repeat-By: | --------- | | I created the `oregonator.oct' and started octave. | When I first typed: | | octave:1> oregonator ([1, 2, 3], 0) | | I got the following error: | | error: FSoregonator__Fv: `Undefined symbol' | error: evaluating index expression near line 1, column 1 | | But when I re-entered the above command. It worked and gave | me correct answer. Please try the following patch. Thanks, jwe Thu Nov 12 16:01:25 1998 John W. Eaton * dynamic-ld.cc (dl_resolve_ref, shl_resolve_ref): Don't fail with error if symbol is missing. (load_octave_oct_file): Print error here if we can't find the symbol we are looking for. *** src/dynamic-ld.cc~ Mon Apr 20 22:01:20 1998 --- src/dynamic-ld.cc Thu Nov 12 16:01:24 1998 *************** *** 352,359 **** lib_list.append (oct_dl_lib (file, dlopen_time, retval)); } ! else ! error ("%s: %s `%s'", dlerror (), file.c_str (), nm); return retval; } --- 352,359 ---- lib_list.append (oct_dl_lib (file, dlopen_time, retval)); } ! // else ! // error ("%s: %s `%s'", dlerror (), file.c_str (), nm); return retval; } *************** *** 437,444 **** lib_list.append (oct_dl_lib (file, shl_load_time, retval)); } } ! else ! error ("%s: %s `%s'", strerror (errno), file.c_str (), nm); return retval; } --- 437,444 ---- lib_list.append (oct_dl_lib (file, shl_load_time, retval)); } } ! // else ! // error ("%s: %s `%s'", strerror (errno), file.c_str (), nm); return retval; } *************** *** 502,507 **** --- 502,509 ---- retval = 1; } } + else + error ("unable to load functions from %s\n", oct_file.c_str ()); } #else