Error Using Mex Compiler
Afficher commentaires plus anciens
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?
Réponses (1)
Walter Roberson
le 15 Jan 2016
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 commentaires
Walter Roberson
le 15 Jan 2016
You copied your .cpp file twice instead of showing the .h
You do not show a #include of the .h file.
Stacey
le 19 Jan 2016
Catégories
En savoir plus sur Language Fundamentals dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!