简体   繁体   中英

octave standalone , example reports undefined reference to `octave::feval error

When try to the 2nd example https://octave.org/doc/v5.1.0/Standalone-Programs.html#Standalone-Programs I got the following error :

embedded.cc:(.text+0x132): undefined reference to `octave::feval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, octave_value_list const&, int)'

The -d option of the mkoctfile provides the following two g++ commands, where the 1st one works fine.

g++ -std=gnu++11 -c  -fPIC -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include/octave-5.1.0/octave/.. -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include/octave-5.1.0/octave -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include  -pthread -fopenmp -fPIC    embedded.cc -o /tmp/oct-EYDDih.o

and

g++ -std=gnu++11  -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include/octave-5.1.0/octave/.. -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include/octave-5.1.0/octave -I/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/include  -pthread -fopenmp -fPIC -rdynamic  -fPIC   -o embedded  /tmp/oct-EYDDih.o    -L/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/lib -L/grid/common/pkgsData/octave-v5.1.0/Linux/RHEL7.0-2017-x86_64/lib/octave/5.1.0 -loctinterp -loctave   

Any idea how to solve this ?

我在这个问题的根本原因中发现,加载了一个 EDA 工具(Cadence Xcelium)模块,它让 g++ 指向其私有版本,当我用 /bin/g++ 替换 g++ 时,它在我的环境中工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM