Compiler Trouble on a Mac OS 10.9.2 using Xcode 5.0.2

Im trying to compile a shared library of functions originally built in a windows .dll file, that has been rebuilt to a Mac OS .dylib file.
Using Xcode and the command line tools package as the compiler I select the complier from the matlab options found as shown below:
mex -setup
The options files available for mex are:
1: /Applications/MATLAB_R2013a_Student.app/bin/mexopts.sh :
Template Options file for building gcc MEX-files
0: Exit with no changes
Enter the number of the compiler (0-1):
Where I choose 1.
When trying to use loadlibrary:
loadlibrary('libepanet.dylib','epanet2.h')
I receive the following errors and warnings.
Warning: The storage type used is an old style. The following file is out of date:
/Users/NathanSankary/.matlab/R2013a/mexopts.sh
> In CompilerConfigurationFactory>CompilerConfigurationFactory.getBasicStructArray at 207
In CompilerConfigurationFactory>CompilerConfigurationFactory.process at 115
In getCompilerConfigurations at 56
In loadlibrary>getLoadlibraryCompilerConfiguration at 490
In loadlibrary at 254
Attempted to access compilerConfiguration(1); index out of bounds because numel(compilerConfiguration)=0.
Error in loadlibrary>getLoadlibraryCompilerConfiguration (line 494)
compilerConfiguration=compilerConfiguration(1); %unix machines return c and cpp compilers here
Error in loadlibrary (line 254)
[thunk_build_fn,preprocess_command]=getLoadlibraryCompilerConfiguration(ccinclude,header,headername,compilerConfiguration);
From here I'm stuck. I have applied the patches to the mexopts.sh file, followed the alterations of:
and also tried the template from:
As said I'm currently running OX 10.9.2, with Xcode 5.0.2 with the command line tools, through 64bit matlab student R2013a (8.1.0.604). I have also tried to compile using Xcode 4.6 and 5.2 with respective command line tools, but both gave the same error.
Im willing to try pretty much anything, and hoping someone may have come across and found a solution to the error or understands what the cause is. Although I have been looking in to this problem for a few days I'm not familiar enough with developing and the mac OS compilers to understand where the issue is.
Thank You!

Respuestas (0)

Categorías

Más información sobre Troubleshooting in MATLAB Compiler SDK en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 4 de Mayo de 2014

Editada:

el 4 de Mayo de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by