一个难题,对C++有经验的人请进
我有一个工程在debug下面运行很好,但是我将它改为realease后发现编译后有很多error C2039的问题,求各位帮忙解答,代码及其错误提示如下。
- C/C++ code
Ref<ResultPointsAndTransitions> lSideOne(transitions[0]); Ref<ResultPointsAndTransitions> lSideTwo(transitions[1]); // Figure out which point is their intersection by tallying up the number of times we see the // endpoints in the four endpoints. One will show up twice. Ref<CornerPoint> maybeTopLeft; Ref<CornerPoint> bottomLeft; Ref<CornerPoint> maybeBottomRight; if (lSideOne->getFrom()->equals(lSideOne->getTo())) // error C2039: “getFrom”: 不是“ XX::Ref”的成员 { bottomLeft = lSideOne->getFrom(); maybeTopLeft = lSideTwo->getFrom(); maybeBottomRight = lSideTwo->getTo(); }
- C/C++ code
namespace XX{namespace datamatrix {using namespace std;ResultPointsAndTransitions::ResultPointsAndTransitions() : to_(), from_(), transitions_(0) { Ref<CornerPoint> ref(new CornerPoint(0,0)); from_ = ref; to_ = ref;}ResultPointsAndTransitions::ResultPointsAndTransitions(Ref<CornerPoint> from, Ref<CornerPoint> to, int transitions) : to_(to), from_(from), transitions_(transitions) {}Ref<CornerPoint> ResultPointsAndTransitions::getFrom() { return from_;}
大概如上,求各位帮忙解答。再谢。
[解决办法]
代码中没有根据debug宏条件编译的话 就查看下debug和release的项目属性有什么差别吧
重点查看它们所链接的lib lib路径