microsoft / microsoft/vscode-cpptools
IntelliSense errors with importing a module on Windows with cl.exe
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
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
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.
Direzione di ricerca
Riproduci il problema di IntelliSense nell’importazione dei moduli nel progetto CMake Visual Studio 2022 collegato, usando i relativi preset e cl.exe. Confronta i file .command generati e CMakeLists.txt, incluso /ifcSearchDir, per determinare come vengono individuati i parametri del compilatore. Il lavoro è completato quando VS Code trova i file di modulo .ifc generati senza configurazione manuale e non segnala più l’errore edgm.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cmake, cpp
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100