I can't enter the main function
i can't enter the main function with this code in my program
mshadow::TShape f;
f = mshadow::Shape2(3, 5);
mxnet::Context d = mxnet::Context::Create(mxnet::Context::kCPU, 1);
mxnet::NDArray a(f, d, false);
but it worked with
mxnet::NDArray c;
Could you be more specific? How are you using this code? What's the error?
@piiswrong I use the pre-built packages on Windows,the cpu-only version,i run the setupenv.cmd and then open the MxnetTestAPP.sln with VS2013. There is no erro message when i compile it ,but when i run it ,i found it can‘t enter the main function. the function is
#include <iostream>
using namespace std;
#include "mxnet/ndarray.h"
#include "mxnet/base.h"
#include "mxnet/symbolic.h"
int main()
{
mshadow::TShape f;
f = mshadow::Shape2(3, 5);
mxnet::Context d = mxnet::Context::Create(mxnet::Context::kCPU, 1);
mxnet::NDArray a(f, d, false);
return 0;
}
but it worked with
#include <iostream>
using namespace std;
#include "mxnet/ndarray.h"
#include "mxnet/base.h"
#include "mxnet/symbolic.h"
int main()
{
mxnet::NDArray a;
return 0;
}
@zhubuntu you probably want to take a look at this: https://github.com/dmlc/mxnet/pull/750
I am working on some C++ examples. In in pull request you can find the first example, which uses the NDArray interface directly to perform a simple c = a + b. Stay tuned for more examples.
On Mon, Nov 30, 2015 at 2:27 PM, Eric Junyuan Xie [email protected] wrote:
@zhubuntu https://github.com/zhubuntu you probably want to take a look at this: #750 https://github.com/dmlc/mxnet/pull/750
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/735#issuecomment-160531423.
HONG Chuntao System Research Group Microsoft Research Asia
@piiswrong I tried your program,and it shows
无法解析的外部符号 "class mxnet::NDArray __cdecl mxnet::operator+(class mxnet::NDArray const &,class mxnet::NDArray const &)"
but it can load the libmxnet.dll. There must be something wrong with my project.Can you tell me how do you config your project?or send me your project file by email,my email is [email protected]. thank you very much.
I did some patching to ndarray.h. You will need that patch to get it working.
I am merging PR #750, after it is finished, you should be able to use the code directly. Remember to rebuild libmxnet.dll before trying the c++ example.
If you cannot wait (since pre-merge checking takes some time), you can also manually clone the repository from: https://github.com/hjk41/mxnet
On Mon, Nov 30, 2015 at 7:39 PM, zhubuntu [email protected] wrote:
@piiswrong https://github.com/piiswrong I tried your program,and it shows
无法解析的外部符号 "class mxnet::NDArray __cdecl mxnet::operator+(class mxnet::NDArray const &,class mxnet::NDArray const &)"
but it can load the libmxnet.dll. There must be something wrong with my project.Can you tell me how do you config your project?or send me your project file by email,my email is [email protected]. thank you very much.
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/735#issuecomment-160606981.
HONG Chuntao System Research Group Microsoft Research Asia
@piiswrong I rebulit the libmxnet.dll as you say ,it can compile right but can't enter the main funciton .The program stucks with the ntdll.dll. But my python works well.
what do you mean by "stuck with ntdll.dll"? Does the program crash or it just stuck on loading that dll? Sometimes Visual Studio will try to load DLLs one by one, loading their debug symbols, which can be really slow. Are you experiencing this issue?
On Tue, Dec 1, 2015 at 11:22 AM, zhubuntu [email protected] wrote:
@piiswrong https://github.com/piiswrong I rebulit the libmxnet.dll as you say ,it can compile right but can't enter the main funciton .The program stucks with the ntdll.dll. But my python works well.
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/735#issuecomment-160837803.
HONG Chuntao System Research Group Microsoft Research Asia
@hjk41 It can load all the DLLs right ,but it just can't go to the next step.This semms like pause at the ntdll.dll. I just begin learning C++ so I don't know what's going on.Here is the Screenshot.I dont't know if you can read chinese or not.

I aslo across the problem. I added the all lib/dll path in config file, but VS2013 still prompt error.

Could you try the latest binary distribution?
On Tue, Dec 8, 2015 at 7:34 PM, bcd33bcd [email protected] wrote:
I aslo across the problem. I added the all lib/dll path in config file, but VS2013 still prompt error. [image: image] https://cloud.githubusercontent.com/assets/8981954/11654701/afdbc9d4-9de2-11e5-86f6-e686942814b7.png
— Reply to this email directly or view it on GitHub https://github.com/dmlc/mxnet/issues/735#issuecomment-162856922.
HONG Chuntao System Research Group Microsoft Research Asia
closing due to inactive status, please feel free to reopen