表达式无法准备在目标中运行

时间:2014-10-20 05:19:49

标签: c++ objective-c lldb

所以我在C ++中有一个向量数组。问题的解决方案是什么?

(lldb) print KVVolData
(std::__1::vector<std::__1::vector<std::__1::vector<double, std::__1::allocator<double> >, std::__1::allocator<std::__1::vector<double, std::__1::allocator<double> > > >, std::__1::allocator<std::__1::vector<std::__1::vector<double, std::__1::allocator<double> >, std::__1::allocator<std::__1::vector<double, std::__1::allocator<double> > > > > >) $0 = size=229 {
  [0] = size=183 {
    [0] = size=10 {
      [0] = 0.00000000000000000000000000000000000000000000001105491104531593
      [1] = 0.000000000000000000000000000000000000000000000000000000000000000000540669918656838
      [2] = 0.00000000000000000000000000000000000000000000000000000000000000000000000000012154950748317273
      [3] = 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038562736527236472
      [4] = 0.000000000000000000000000000000000000000000000000000000000000037878508340191531
      [5] = 0.0000000000000000000000000000000000000000000000000000000024014993980098232
      [6] = 0.00000000000000000000000000000000000000000072414226491662559
      [7] = 0.000000000000000000000000000000004079177389466422
      [8] = 0.00000000000000000000000000000000000000000000000000018972946169202669
      [9] = 0.0000000000000000000000000000000000000000000000000001792070883744225
    }

当我需要从这个数组中提取值时

print KVVolData[0][0][3]
error: call to a function 'std::__1::vector<std::__1::vector<std::__1::vector<double, std::__1::allocator<double> >, std::__1::allocator<std::__1::vector<double, std::__1::allocator<double> > > >, std::__1::allocator<std::__1::vector<std::__1::vector<double, std::__1::allocator<double> >, std::__1::allocator<std::__1::vector<double, std::__1::allocator<double> > > > > >::operator[](unsigned long)' ('_ZNSt3__16vectorINS0_INS0_IdNS_9allocatorIdEEEENS1_IS3_EEEENS1_IS5_EEEixEm') that is not present in the target
error: The expression could not be prepared to run in the target
(lldb) 

1 个答案:

答案 0 :(得分:0)

或许将-D_LIBCPP_INLINE_VISIBILITY = \&#34; \&#34;添加到您的CXXFLAGS,应该可以解决问题。