Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
attempt at using node-ffi, but node-ffi cannot find the symbols
#include <stdint.h>
#include <QtCore/QtGlobal>
#if defined(MYSHAREDLIB_LIBRARY)
# define MYSHAREDLIB_EXPORT Q_DECL_EXPORT
#else
# define MYSHAREDLIB_EXPORT Q_DECL_IMPORT
#endif
MYSHAREDLIB_EXPORT uint64_t factorial(int max) {
int i = max;
uint64_t result = 1;
while (i >= 2)
result *= i--;
return result;
}
var FFI = require('node-ffi')
,libstackoverflow = new FFI.Library("build/libstackoverflow", {
'factorial': [ 'uint64', [ 'int' ] ]
});
console.log(libstackoverflow.factorial(10));
######################################################################
# Automatically generated by qmake (2.01a) Wed Jun 8 21:28:16 2011
######################################################################
TEMPLATE = lib
DEFINES += MYSHAREDLIB_LIBRARY
CONFIG += qt dll
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = ./build
# Input
SOURCES += main.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.