GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — node-ffi/example/factorial at master · unbornchikken/node-ffi

Expand file tree

/

factorial

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

factorial

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
factorial.c
factorial.c
 
 
factorial.js
factorial.js
 
 

README.md

To compile libfactorial.dylib on OS X:

$ gcc -dynamiclib -undefined suppress -flat_namespace factorial.c -o libfactorial.dylib

To compile libfactorial.so on Linux/Solaris/etc.:

$ gcc -shared -fpic factorial.c -o libfactorial.so

To compile libfactorial.dll on Windows (http://stackoverflow.com/a/2220213):

$ cl.exe /D_USRDLL /D_WINDLL factorial.c /link /DLL /OUT:libfactorial.dll

To run the example:

$ node factorial.js 35
Your output: 6399018521010896896
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.