FAQ Database Discussion Community

How do you link external shared libraries to a native extension?

I'm writing a pty native extension and want to link libutil so that I may use forkpty and openpty from <pty.h>. I'm using the two commands taken from the official guide: g++ -fPIC -lutil -I/home/crunchex/work/dart-sdk -c pty.cc -o pty.o gcc -shared -Wl,-soname,libpty.so -o libpty.so pty.o and I'm getting the following...

Does the dart VM impose restrictions on the stack memory size of a native extension?

I'm learning to write a native extension and I noticed an odd occurrence. When I allocate a multidimensional array and access it like so: (excuse any messy C code and bad practices I might be using unless they're likely the cause of my error. My C is not-so-great) int table[rows][cols];...

How do you convert a Dart_Handle List to a C++ array?

I'm trying to port over a node.js native abstraction to dart as a native extension. The node.js nan also happens to be using the v8 namespace, which I'm not terribly familiar with. The [incomplete] code snippet in particular that I'm having trouble with would be this: NAN_METHOD(TestFunction) { NanScope(); String::Utf8Value...