Help with creating a MEX file in MATLAB from multiple C++ Source codes
이전 댓글 표시
I am trying to create a MEX file in MATLAB with multiples C++ source codes in .cpp and .h extensions. The C++ source codes builds fine with no errors in Microsoft Visual C++ 2010 professional and i have created a static library of .lib file All source code files and static library of functions are located in my MATLAB current folder path In MATLAB i have selected my default compiler as MS Visual C++ Professional 2010 and i am using the following syntax in MATLAB mex -v [list of C++ source code files i.e. .cpp and .h files] -l[static library name] -L.
I get a link error in MATLAB as; LINK : error LNK2001: unresolved external symbol mexFunction C:\Users\abo09001\AppData\Local\Temp\mex_Ko9pXP\templib.x : fatal error LNK1120: 1 unresolved externals
I do not know how to program in C++ but i am relatively ok in MATLAB. Any help with the error will be appreciated.
댓글 수: 3
Abigail Osei-Asamoah
2013년 9월 17일
Nathan Crosty
2013년 9월 17일
Are your functions and or symbols that you are referencing externs?
Abigail Osei-Asamoah
2013년 9월 17일
채택된 답변
추가 답변 (1개)
Abigail Osei-Asamoah
2013년 9월 17일
0 개 추천
댓글 수: 4
James Tursa
2013년 9월 17일
What errors specifically?
Jan
2013년 9월 17일
Then please post the error message to give us a chance to help you.
Abigail Osei-Asamoah
2013년 9월 18일
Abigail Osei-Asamoah
2013년 9월 18일
카테고리
도움말 센터 및 File Exchange에서 Call C/C++ from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!