在OSX上安装节点画布我收到警告,为什么会这样?

时间:2016-01-18 14:06:26

标签: node.js macos canvas

我想官方软件包应该是稳定的而不是抛出编译警告,所以也许我的版本错误了?

规格:
- OSX 10.8.5
- Xcode 5.1.1
- 节点4.2.4
- npm 2.14.12

$ npm install canvas --save-dev
-
> canvas@1.3.7 install /Users/petruza/Source/Misc/test/electron-quick-start/node_modules/canvas
> node-gyp rebuild

  SOLINK_MODULE(target) Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
In file included from ../src/CanvasPattern.cc:10:
../src/CanvasPattern.h:23:9: warning: private field '_width' is not used [-Wunused-private-field]
    int _width, _height;
        ^
../src/CanvasPattern.h:23:17: warning: private field '_height' is not used [-Wunused-private-field]
    int _width, _height;
                ^
2 warnings generated.
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
  CXX(target) Release/obj.target/canvas/src/ImageData.o
  CXX(target) Release/obj.target/canvas/src/init.o
  CXX(target) Release/obj.target/canvas/src/FontFace.o
In file included from ../src/FontFace.cc:7:
../src/FontFace.h:27:15: warning: private field '_ftFace' is not used [-Wunused-private-field]
    FT_Face   _ftFace;
              ^
1 warning generated.
  SOLINK_MODULE(target) Release/canvas.node
canvas@1.3.7 node_modules/canvas
└── nan@2.2.0

1 个答案:

答案 0 :(得分:1)

这些警告意味着开发人员只是粗心大意。只要没有任何基金会或公司支持,我就不会将npm上的任何内容视为正式的。只需忽略这些警告。