Skip to content

Commit 692255b

Browse files
committed
build package
1 parent 2f2685e commit 692255b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/buid.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
with:
4141
msbuild-architecture: ${{ matrix.target }}
4242

43+
- name: install x11 dev
44+
if: contains(matrix.os,'ubuntu')
45+
run: sudo apt-get install libx11-dev
46+
4347
- name: Install dependencies
4448
run: npm install --build-from-source
4549

README-zh_CN.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ https://github.com/nodejs/node-addon-api
7171

7272
# 遇到的问题记录
7373

74-
linux 编译时报错
74+
问题 1:linux 编译时报错
7575

7676
···
7777
../node_modules/node-addon-api/napi-inl.h:2464:34: error: cannot bind non-const lvalue reference of type ‘Napi::CallbackInfo&’ to an rvalue of type ‘Napi::CallbackInfo’
@@ -81,3 +81,13 @@ linux 编译时报错
8181
Napi::Object node_getMousePos(Napi::CallbackInfo &info)
8282
的参数要加 const
8383
Napi::Object node_getMousePos(const Napi::CallbackInfo &info)
84+
85+
问题 2:
86+
87+
```
88+
./src/mouse.c:12:10: fatal error: X11/extensions/XTest.h: No such file or directory
89+
```
90+
91+
网上说要安装库
92+
93+
sudo apt-get install libx11-dev

0 commit comments

Comments
 (0)