虚函数 error LNK2001: 无法解析的外部符号 "public: virtual void __cdecl
在虚函数后面加一对大括号
#ifndef CAFFE_CONV_DW_LAYER_HPP_
#define CAFFE_CONV_DW_LAYER_HPP_ #include <vector>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h" namespace caffe { template <typename Dtype>
class ConvolutionDepthwiseLayer : public Layer<Dtype> {
public:
explicit ConvolutionDepthwiseLayer(const LayerParameter& param)
: Layer<Dtype>(param) {}
virtual void LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top){};
virtual void Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top){};
virtual inline int ExactNumBottomBlobs() const { return ; }
virtual inline int ExactNumTopBlobs() const { return ; }
virtual inline const char* type() const { return "ConvolutionDepthwise"; }
protected:
virtual void Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top){};
virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top){};
virtual void Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom);
virtual void Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom){};
unsigned int kernel_h_;
unsigned int kernel_w_;
unsigned int stride_h_;
unsigned int stride_w_;
unsigned int pad_h_;
unsigned int pad_w_;
unsigned int dilation_h_;
unsigned int dilation_w_;
Blob<Dtype> weight_buffer_;
Blob<Dtype> weight_multiplier_;
Blob<Dtype> bias_buffer_;
Blob<Dtype> bias_multiplier_;
}; } // namespace caffe #endif // CAFFE_CONV_DW_LAYER_HPP_
$ sudo make pycaffe 出错
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
Makefile:502: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1
Makefile.config 中 加local
PYTHON_INCLUDE := /usr/include/python2. \
/usr/local/lib/python2./dist-packages/numpy/core/include
#/usr/lib/python2./dist-packages/numpy/core/include
重新 make pycaffe 就可以了
虚函数 error LNK2001: 无法解析的外部符号 "public: virtual void __cdecl的更多相关文章
- vs2010+qt4编译出现error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject等错误
1.当vs2010编译qt时会出现以下错误: 1>------ 已启动全部重新生成: 项目: MyDialog, 配置: Debug Win32 ------ 1>生 ...
- error LNK2001: 无法解析的外部符号 "public: virtual long __stdcall CBaseFilter(转)
原文转自 https://www.cnblogs.com/xiongjiaji/archive/2010/12/31/2476565.html 今天用VS2005编译DirectShow程序,发现出来 ...
- main.obj:-1: error: LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall CustomButton::metaObject(void)const " (?metaObject@CustomButton@@UBEPBUQMetaObject@@XZ)
QTCreator 运行时报错 main.obj:-1: error: LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject cons ...
- error LNK2001: 无法解析的外部符号 "public: char * __thiscall
error LNK2001: 无法解析的外部符号 "public: char * __thiscall CamPinPadCtrl::KeysConvert(unsigned long,ch ...
- 无法解析的外部符号 "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)"
采用下面的方法.重新编译了一下依赖的库,OK了. 问题描述: 今天用VS2010编译一个在VS2008下Coding的工程的时候,VS给出了一堆链接错误信息,如下图所示: 在ErrorList里面 ...
- error LNK2001: 无法解析的外部符号
1.错误描述 error LNK2001: 无法解析的外部符号 "__declspec(dllimport) void __cdecl PadSystem::Private::printQS ...
- 无法解析的外部符号 "public: virtual struct CRuntimeClass * _
SetupPropertyPage.obj : error LNK2001: 无法解析的外部符号 "public: virtual struct CRuntimeClass * __this ...
- 查看静态库(.lib)和动态库(.dll)的导出函数的信息 error LNK2001: 无法解析的外部符号 _Delete
转自VC错误:http://www.vcerror.com/?p=1381 在window下查看动态库的导出函数可以用vs自带的Dependenc工具: 查看静态库的信息要用命令行来实现: 首先运行V ...
- C++工程编译之“error LNK2001: 无法解析的外部符号”
今天一整天都在折腾“error LNK2001: 无法解析的外部符号”,就在头疼不已的时候,总算是找到问题原因了:各个动态链接库的编译方式必须统一才行,要不然很容易对库函数的引用产生冲突.简单来说就是 ...
随机推荐
- JDK8 HashMap--removeNode()移除节点方法
/*删除节点*/ final Node<K,V> removeNode(int hash, Object key, Object value, boolean matchValue, bo ...
- PYTHON装饰器用法及演变
'''开放封闭原则: 软件一旦上线之后就应该满足开放封闭原则 具体就是指对修改是封闭的,对扩展是开放的装饰器:什么是装饰器:装饰就是修饰,器指的是工具装饰器本省可以是任意可调用的对象被装饰的对象也可以 ...
- vector创建二位数组
默认初始化vector vector<vevtor<int> > arr(row, vector<int>(col, 0)); //指定行大小为row,列为col, ...
- php 中 global 与 $GLOBAL 的区别
很多人都认为global和$GLOBALS[]只是写法上面的差别,其实不然. 根据官方的解释是$GLOBALS['var'] 是外部的全局变量$var本身. global $var 是外部$var的同 ...
- 帮助Bsny(乱搞做法)
帮助Bsny 题目描述 Bsny的书架乱成一团了,帮他一下吧! 他的书架上一共有n本书,我们定义混乱值是连续相同高度书本的段数.例如,如果书的高度是30,30,31,31,32,那么混乱值为3:30, ...
- Hive中常用的参数配置
-- 查看当前环境参数配置set -v;-- 重置配置为默认值reset; -- 调整map数-- input的文件大小,集群设置的文件块大小,hive中通过set dfs.block.size;命令 ...
- postgresql 自定义函数
CREATE OR REPLACE FUNCTION "public"."pm25_aqi"("pm25_nd" numeric) RETU ...
- FairyGUI TextField
记录一个在使用FairyGUI的TextField时遇到的坑. TextField有一个文本模板功能,可以实现类似占位符的功能,如:{ number = 0 },然后我们可以在脚本中修改number的 ...
- 多态 鸭子类型 反射 内置方法(__str__,__del__) 异常处理
''' 1什么是多态 多态指的是同一种/类事物的不同形态 2 为何要有多态 多态性:在多态的背景下,可以在不用考虑对象具体类型的前提下而直接使用对象 多态性的精髓:统一 多态性的好处: 1增加了程序的 ...
- websocket flutter
https://stackoverflow.com/questions/51077233/how-can-i-use-socket-in-flutter-app import 'dart:io'; i ...