C1083: Cannot open include file: 'napi.h': No such file or directory
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp, node.js
- Ambito
- build-system
Direzione di ricerca
Start with the include and include_dir definitions in index.js and the example binding configuration shown in the issue. Reproduce the napi.h lookup on Windows and WSL, then verify that the chosen include path resolves napi.h correctly on both platforms.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I get an error about not being able to find napi.h on Windows.
This only occurs when I use "include_dirs": ["<!@(node -p \"require('node-addon-api').include_dir\")"] versus "include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"] (I was trying to use the former because in the index.js file it says the latter is deprecated.
The only difference I noticed is that inside the in the index.js file in the repo we have the include path in escaped quotes.
I've tried doing this as an experiment in another bindings repo and I found if I add the quotes to the include path it works versus without.
include: `"${__dirname}"`
versus
include: `${__dirname}`
(The second one gives the error)
[Edit]: I just tried this on Linux (using WSL) and seems like I have the inverse problem...
fatal error: napi.h: No such file or directory
4 | #include "napi.h"
| ^~~~~~~~
compilation terminated.
- Lingua principale
- C++
- Stelle
- 2.6k
- Fork
- 602
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nodejs/node-addon-examples
-
Create Valgrind run of tests Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
nodejs/node-addon-examples#585 · 1 reazione ·
-
Add .d.ts files in samples. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
nodejs/node-addon-examples#530 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
nodejs/node-addon-examples#445 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
nodejs/node-addon-examples#444 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
nodejs/node-addon-examples#381 ·
Tutte le issue di nodejs/node-addon-examples
Issue simili
-
[BUG] Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
eunomia-bpf/llvmbpf#51 · 1 commento ·
-
status:needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PX4/PX4-Autopilot#28776 ·
-
Website Doc Typo Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100