unresolved external symbol mxnet::Symbol::CreateVariable,I already add the libmxnet.lib to the linker
I try the example file mlp.cpp. I have add the libmxnet.lib to the linker.But there were always compilation errors such as:
error LNK2001: unresolved external symbol "public: static class mxnet::Symbol __cdecl mxnet::Symbol::CreateVariable(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
There should be a makefile came with the example. Did you use that?
@piiswrong I use the VS2013 on win10,I dont't know how to use makefile with VS2013.This semms to be the problem of libmxnet.lib. I think the Ndarray and Symbol should also be contained in libmxnet.lib.But the Ndarray works fine, Symbol not.Is there something I configure wrong about the project?
@zhubuntu I never try compiling MXNET in windows. I'll try it later.
Maybe @hjk41 could help you?
@zhubuntu The problem is caused by not exporting Symbol in DLL library. NDArray is explicitly exported in the DLL, that's why the NDArray example works. A quick fix is to modify line 40 of symbolic.h into
class MXNET_API Symbol {
and then recompile libmxnet.dll.
@zhangchen-qinyinghua Can we modify the code so it uses APIs only in the c_api.h? That way we won't need to export the C++ classes and functions one by one.
@hjk41 Oh, I see. I think it could be done using APIs in c_api.h only. I will think about that.
@hjk41 Thanks, it works.