Error Using Mex Compiler
이전 댓글 표시
I'm trying to compile using the command "mex MEXIrradiation.cpp"
Matlab is returning this error:
Error using mex
/tmp/mex_17281680784358282_33076/MEXIrradiation.o: In function `mdlOutputs(SimStruct_tag*, int)':
MEXIrradiation.cpp:(.text+0x3a0): undefined reference to `PVLCLR::PVL_Utils::irradiation(long, PVLCLR::PVL_Location const&,
PVLCLR::PVL_Orientation const&, double, double&, double&, double&, double&, double&, double&, double&)'
collect2: error: ld returned 1 exit status
Does anyone know how I can fix this?
답변 (1개)
Walter Roberson
2016년 1월 15일
Well we can tell you to define
PVLCLR::PVL_Utils::irradiation(long, PVLCLR::PVL_Location const&,
PVLCLR::PVL_Orientation const&, double, double&, double&, double&, double&, double&, double&, double&)
Perhaps you have defined that routine with a different signature that is not compatible with how it was called.
We cannot give you more then very generic advice as we have never seen your code, and the routine names you mention do not appear to be part of any code indexed anywhere by Google.
댓글 수: 3
Walter Roberson
2016년 1월 15일
You copied your .cpp file twice instead of showing the .h
You do not show a #include of the .h file.
Stacey
2016년 1월 19일
카테고리
도움말 센터 및 File Exchange에서 Language Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!