Skip to main content

Questions tagged [c]

The tag has no usage guidance.

2 votes
0 answers
76 views

A question about using .dll in Mathematica with LibraryFunctionLoad

I am trying to use a custom trilinear interpolation written in C in Mathematica (Windows). This is the code I start with: ...
John Taylor's user avatar
  • 5,825
11 votes
3 answers
299 views

ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array

I have an external c-function I need to call, and I wish to use ForeignFunctionLoad. The c-function, foo, takes as an argument a reference to a struct, for example: ...
Stefan Gillessen's user avatar
4 votes
0 answers
98 views

Are ForeignFunction and its friends the next generation of LibraryLink?

It's a bit surprising to me that no one asks about this so far, so let me step up :) . In version 13.3, an EXPERIMENTAL Foreign Function Interface has been introduced. I'm by no means a C expert, but ...
xzczd's user avatar
  • 67k
2 votes
0 answers
37 views

Checking debug mode in C-code when call CreateLibrary with Debug -> True

I create a C-library and compile it using the tools in LibraryLink. When I create a code binary like this ...
Kirill Belov's user avatar
4 votes
1 answer
108 views

Mathematica 12.0 finds Visual studio C compiler for use of CompilationTarget -> "C" in Compile but Compile does not work

I installed Visual Studio and then the command CCompilers[] in Mathematica 12.0 nicely gives: {{"Name" -> "Visual Studio", "Compiler" -> CCompilerDriver...
Wise View's user avatar
1 vote
0 answers
253 views

How can I set up Compile[] correctly on my Windows 11? I keep on getting an error that I have no compilers installed (but I do)

I'm trying to use Mathematica's Compile[] function to speed up some of my computations: ...
Klangen's user avatar
  • 1,009