C1083: Cannot open include file: 'napi.h': No such file or directory
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- cpp, node.js
- Bereich
- build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C++
- Sterne
- 2.6k
- Forks
- 598
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nodejs/node-addon-examples
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#585 · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#530 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#445 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 32/100
nodejs/node-addon-examples#444 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#381 ·
Alle Issues in nodejs/node-addon-examples
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
meshcore-dev/MeshCore#3760 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
deepseek-ai/DeepGEMM-Ascend#29 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
EchoTools/nevr-runtime#2042 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
emscripten-core/emscripten#28160 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Download size and speed show scientific notation between 1000 and 1023 unitsEvtl. vergeben @RaphaelFakhri hat das heute übernommen. Offen
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
kiwix/kiwix-desktop#1570 ·
Maintainer antworten meist innerhalb von 1 Tag