InsideLoop
InsideLoop

Reputation: 6255

Dyld crash with MathLink framework

I am trying to call a C program from within Mathematica. I have compiled the addtwo.c example provided by Wolfram Research with

fayard@Speed:MathLink$ /Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions/mcc --verbose addtwo.tm addtwo.c
/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions/mprep   addtwo.tm -o a.out.tm.c
/usr/bin/clang -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions -arch i386 -arch x86_64  -c -o addtwo.o addtwo.c
/usr/bin/clang -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions -arch i386 -arch x86_64  -c -o a.out.tm.o a.out.tm.c
/usr/bin/clang++ -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions -arch i386 -arch x86_64  -o a.out addtwo.o a.out.tm.o  -L/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions -lstdc++ -F /Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/MacOSX-x86-64/CompilerAdditions -framework mathlink -framework Foundation

Unfortunately, when I try to load the library from Mathematica, I get a stall and I find that my application crashed. In ~/Library/Logs/DiagnosticReports, I get a crash from addtwo

Application Specific Information:
    dyld: launch, loading dependent libraries

Dyld Error Message:
    Library not loaded: @executable_path/../Frameworks/mathlink.framework/Versions/4.25/mathlink
    Referenced from: /Users/USER/Documents/*/addtwo
    Reason: image not found

I don't know what to do.

Upvotes: 1

Views: 78

Answers (0)

Related Questions