microsoft / microsoft/vscode-cpptools
IntelliSense errors with importing a module on Windows with cl.exe
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
Ok, some progress:
I've created a new simpler project with one module but this time, I've created from Visual Studio 2022 Community CMake project wizard.
This time Visual Studio has no problem in finding the module (you must compile it twice for it to work properly - because the first time it generates the ifc files):

VSCode still can't see it:

The CMake project uses presets when created with VS wizards.
In both I can compile, run, and debug normally.
And if I force the /ifcSearchDir into CMakeLists.txt VSCode gives me the edgm error (VS does see the modules and finds the ifc files without setting this manually in the CMakeLists.txt). I noticed that .command files were generated in the build destination, and they have all the compilers parameters that are necessary to compile each file. My guess is that VS is using it to correctly generate the Intellisense and find everything.
Originally posted by @Bigous in https://github.com/microsoft/vscode-cpptools/issues/6302#issuecomment-1269190650
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den IntelliSense-Fehler beim Modulimport im verknüpften Visual Studio 2022 CMake-Projekt unter Verwendung seiner Presets und cl.exe. Vergleiche die generierten .command-Dateien und CMakeLists.txt, einschließlich /ifcSearchDir, um zu bestimmen, wie Compilerparameter ermittelt werden. Als erledigt gilt die Aufgabe, wenn VS Code die generierten .ifc-Moduldateien ohne manuelle Konfiguration findet und den edgm-Fehler nicht mehr meldet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cmake, cpp
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100