New answers tagged librarylink
This is a incompatible pointer problem. Just change int const *dims to mint const *dims (a total of 2 places), and the function will give correct results. My attempt to explain the difference: (Since I don't use C, I may make mistakes. Feel free to edit, or if there are any serious mistakes, I will remove this paragraph) mint refers to long in my system (...
I am not sure I understand your question, as it really does read like "How to call a function in C?", which is a C question, not a Mathematica one, as @blochwave said. Maybe you are asking, how to call a function with a signature like this: DLLEXPORT int fun(WolframLibraryData libData, mint Argc, MArgument *Args, MArgument Res) Just don't call it! It's ...
http://mathematica.stackexchange.com/a/118739/6804 discusses compiling a library link dll and attaching a debugger. With say Visual Studio, you can just attach to process -> WolframKernel.exe after the dll has been loaded (via LibraryFunctionLoad).
Top 50 recent answers are included