mainwindow.cpp:(.text+0x91b2): undefined reference to `endpoint_se(QVector<double>, int,............
2014-10-29 09:23
323 查看
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/cry.gif)
无语搞了半天不知道这个错误怎么解决,头文件也包括了,参数也正确不知道哪错了。
是不是标点符号的问题呢??试试。
调试过程中发现一个问题,比如一个函数void test(int a) { a++; } 外面的a是不会变的,写成void test(int &a) { a++; } 才行
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/wail.gif)
卧槽,然后我把函数中的一个int参数改为int & 型居然编译就通过了
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/cute.gif)
啊啊,我错了,问题未解决。头疼、 不会是我传递参数过多吧?传了10个参数。
啊啊啊,原来是一个QVector<double> 参数给的不是地址,少了&,导致程序出错,不过这个undefined reference太让人误会了吧,还以为定义哪里出问题了
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/struggle.gif)
相关文章推荐
- output.cpp:(.text+0x3a29): undefined reference to `std::basic_ostream<char, std::char_traits<char>
- Error: undefined reference to `templatename<int,int >' ( error LNK2019: 无法解析的外部符号......)
- 使用muduo编译链接错误 undefined reference to `muduo::ThreadPool::run(boost::function<void ()()>&&)'
- undefined reference to `std::allocator<char>::~allocator()'
- 关于arm-linux-gcc交叉编译工具链,实现自己的crt0或者编译UBOOT出现undefined reference to `__aeabi_unwind_cpp_pr0'的解决方法
- gcc编译cpp文件 出现undefined reference to `__gxx_personality_v0'
- eclipse中如何去除警告:Class is a raw type. References to generic type Class<T> should be parameterized
- 用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题的解决
- Android NDK r6b使用stl遇到undefined reference to `std::__node_alloc::_M_allocate(unsigned int&)” 的终极解决办法
- eclipse C++ undefined reference to `main'
- [ANDROID NDK ERROR]crtbegin_dynamic.o: undefined reference to 'main'
- gcc 共享库的时候显示.../crt1.o: In function `_start': (.text+0x18): undefined reference to `main'的错误
- \include\wspiapi.h(45) : error C2265: '<Unknown>' : reference to a zero-siz
- undefined reference to `__aeabi_unwind_cpp_pr0' 问题解决办法
- gcc链接.cpp和.c文件生成的.o库文件的时候,Linking error "undefined reference to `__gxx_personality_v0'"
- In fuction '_start': ..... :undefined reference to 'main'
- fedora 15 安装opencv2.2时出现undefined reference to `cvCreateCameraCapture_V4L(int)'问题及其解决方法
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题的解决
- 用gcc来玩cpp文件的提示 undefined reference to `__gxx_personality_v0'