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!