Coder Social home page Coder Social logo

qianbo0423 / nodejs_call_c_cc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhoudd1/nodejs_call_c_cc

0.0 1.0 0.0 1.57 MB

nodejs call c/c++

C++ 1.82% JavaScript 2.61% Python 0.79% Makefile 5.74% C 45.36% M4 2.44% Shell 13.46% Roff 0.22% Assembly 18.58% TeX 8.99%

nodejs_call_c_cc's Introduction

1) node-ffi编译
node-gyp configure build
交叉编译
node-gyp --arch=arm configure build

2) addon c++编译

nodejs的C/C++拓展,将c/c++源码编译成js模板库
node-gyp configure
node-gyp build

交叉编译

export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export LD=arm-linux-gnueabihf-ld
export RAINLIB=arm-linux-gnueabihf-rainlib
export AR=arm-linux-gnueabihf-ar
export LINK=arm-linux-gnueabihf-g++
node-gyp configure --arch=arm
node-gyp build --arch=arm

3) nodejs库安装,编译
npm init
npm install -save websocket
npm install ref-array
npm install -save ref-array
npm install -save ref-struct
npm rebuild
交叉编译
npm init
npm install -save websocket --arch=arm
npm install ref-array --arch=arm
npm rebuild --arch=arm

 


nodejs_call_c_cc's People

Contributors

zhoudd1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.