Error compiling Faddeeva function

4 views (last 30 days)
alan
alan on 11 Dec 2012
Hello,
Love this program http://www.mathworks.com/matlabcentral/fileexchange/38787. I have it up and running on my mac to simulate voigt broadening. Im trying to add this functionality to a lab computer running win32 matlab 7.12.0 (R2011a), but I cannot successfully compile with mex.
With Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2011a\sys\lcc:
lcc preprocessor error: .\Faddeeva.hh:30 .\Faddeeva_mex.cc:35 Faddeeva_w_mex.cc:3 Could not find include file <complex>
With Microsoft Visual C++ 2010 Express in C:\Program Files\Microsoft Visual Studio 10.0:
Faddeeva.cc
Faddeeva.cc(184) : error C2124: divide or mod by zero
Faddeeva.cc(822) : error C3861: 'copysign': identifier not found
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Compile of 'Faddeeva.cc' failed.
The only instances of complex.h are in a pythonwx folder not related to matlab. I tried re-installing matlab, and net framework, vs etc. Any help would be much appreciated.
  2 Comments
alan
alan on 11 Dec 2012
update: same error on windows 7 64bit machine with visual C++ 2010
alan
alan on 13 Dec 2012
Still cant get it to work...Looks like it might be easier to rewrite my code in python.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 11 Dec 2012
.cc files are for C++, but lcc is only a C compiler and cannot handle C++ code.
  4 Comments
alan
alan on 11 Dec 2012
Edited: Walter Roberson on 11 Dec 2012
sure does line 123: "#include &ltcmath>" . Is there an easy way to debug/test these packages and add them back in?
Walter Roberson
Walter Roberson on 11 Dec 2012
Sorry, I don't have my MS Windows session handy.

Sign in to comment.

Categories

Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!