caffe icon indicating copy to clipboard operation
caffe copied to clipboard

_caffe.cpp libprotobuf.lib(generated_message_util.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Open xuzhm opened this issue 10 years ago • 4 comments

When I "\python\caffe_caffe.cpp" compiled into "_caffe.pyd", there have been some problems:

libprotobuf.lib(generated_message_util.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'X64'

what's wrong with me? Any suggestion is welcome.

xuzhm avatar Jul 06 '14 09:07 xuzhm

Sorry, the python and matlab wrappers are not implemented for this windows porting yet.

niuzhiheng avatar Jul 07 '14 11:07 niuzhiheng

你有按照 作者说的那个顺序弄吗。生成平台为X64,其他应该没问题,我python _caffe.pyd生成了,但是貌似没出结果。 但是matlab接口在windows上可以用,你需要自己写mex文件,并且要自己手动生成一个libcaffe.lib库。 将matcaffe.cpp 编译成 caffe.mexw64文件。然后运行demo即可出结果。

VirtualEarth avatar Jul 09 '14 09:07 VirtualEarth

是按照那个来弄的,但是还是生成不了_caffe.pyd。现在就是想用下Python的接口,你能告诉下你是怎么弄的么,万分感谢!

xuzhm avatar Jul 09 '14 11:07 xuzhm

你需要用vs建立一个dll工程,目标扩展名改为pyd, 在属性里面配置相应的库,头文件 ,就可以了,目标名必须是_caffe,才能调用,那个cpp导出名已经写好了。实在弄不出来,你就跑linux版本的,然后查看编译日志,有相应的编译过程及连接到的库,用同样的方法就可以在windows下搞定。我当初就这么弄得。

VirtualEarth avatar Jul 09 '14 13:07 VirtualEarth