Page 1 of 1

mex problem with Mac

PostPosted: Wed Dec 22, 2010 2:13 am
by macroguy
Hi,

I have used Dynare before with Windows, and I am now converting to Mac. I installed Dynare on Mac 10.5.8 using the instructions available here:http://www.dynare.org/DynareWiki/InstallOnMacOSX

My installed Dynare works for 1st and 2nd order appox when I dont used the use_ddl option under model. When I ask for 3rd order approx and therefore use the ddl library, the code returns the following error:

gcc-4.0: Invalid arch name : -Wl,-syslibroot,

mex: link of ' "Closed_End_RBC_Dynare_dynamic.mexmaci"' failed.

??? Error using ==> mex at 213
Unable to complete successfully.

Error in ==> Closed_End_RBC_Dynare at 57
eval('mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined error -arch \$ARCHS -Wl,-syslibroot,\$SDKROOT
-mmacosx-version-min=\$MACOSX_DEPLOYMENT_TARGET -bundle'' Closed_End_RBC_Dynare_dynamic.c')
Error in ==> dynare at 132
evalin('base',fname) ;


Two questions:

1) In windows one needs to run for example 'dynare modfilename msvc' in order to tell Matlab to use the msvc mex compiler. What command needs to be used for Mac 10.5.8?

2)Any suggestions on the above error. It was generated by running 'dynare modfilename'?

Re: mex problem with Mac

PostPosted: Thu Jan 06, 2011 2:58 pm
by HoutanBastani
1) In windows one needs to run for example 'dynare modfilename msvc' in order to tell Matlab to use the msvc mex compiler. What command needs to be used for Mac 10.5.8?

The dynare command syntax is the same across platforms.

2)Any suggestions on the above error. It was generated by running 'dynare modfilename'?

I have not run into this error before. Please post your .mod file.

Re: mex problem with Mac

PostPosted: Mon Jan 10, 2011 5:59 pm
by SébastienVillemot
HoutanBastani wrote:
1) In windows one needs to run for example 'dynare modfilename msvc' in order to tell Matlab to use the msvc mex compiler. What command needs to be used for Mac 10.5.8?

The dynare command syntax is the same across platforms.


This is not entirely true. Actually the "msvc" option only applies to Windows. You can just drop it under Mac or Linux.