how to run hello.cpp without the link error?
显示 更早的评论
Error: Link of 'hello.mexw64' failed.
hello.cpp just contains the code:
#include <iostream>
using namespace std;
int main() { cout<<"Hello sow..!"; return 0; }
回答(1 个)
James Tursa
2016-2-26
编辑:James Tursa
2016-2-26
You need to have the gateway function mexFunction in your source code. See this link and the examples listed there:
Once you have that set up properly, and the file is in the current directory, then all you do is enter this at the command prompt:
mex hello.cpp
2 个评论
sowjanya boddeti
2016-2-28
Jan
2016-2-28
Please format your code using the "{} Code" button and post the complete error message. Don't you see that the code is not readable?
类别
在 帮助中心 和 File Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!