Closed lewisl closed 1 year ago
Only edit and save xmake.lua to trigger the compile_commands generation, or execute the updateIntelligense command manually
see https://xmake.io/#/plugin/more_plugins?id=configure-intellsence
First of all, thank you. Didn’t see it in docs, but that is easy. The file is generated.
Now, more problems:
Visual Studio Code refuses to launch the language server, sourcekit-lsp. It tries and the server crashes repeatedly and then VS Code refuses to launch it.
I decided to make a new project in a completely different directory and I used xmake new project command in VS code. It makes a directory structure with a main.cpp, which is hello, world!
Guess what? On Macos Ventura 13.3 this won’t compile!. There is some directory mapping problem I cannot sort out. The compiler can’t find the right wchar.h.
Here is the error message: Executing task: xmake -w
[ 25%]: cache compiling.debug src/main.cpp error: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:123:15: fatal error: 'wchar.h' file not found
^~~~~~~~~
1 error generated.
in src/main.cpp
But, an INSTANCE of wchar.h is found in the includes directory. But it is looking for a different wchar.h header file.
In the wonderful app codeRunner, which is perfect for single file code, of course it compiles and runs. Only when we do a “mature serious developer” build does it fail. And that is using the trivial default xmake.lua file that is used in the template:
add_rules("mode.debug", "mode.release")
target("one") set_kind("binary") add_files("src/*.cpp")
So, this is all very troubling. Got any suggestions for either problem?
From: ruki @.> Reply-To: xmake-io/xmake-vscode @.> Date: Thursday, April 6, 2023 at 7:59 PM To: xmake-io/xmake-vscode @.> Cc: Lewis Levin @.>, Author @.***> Subject: Re: [xmake-io/xmake-vscode] compile_commands.json not created (Issue #184)
Only edit and save xmake.lua to trigger the compile_commands generation, or execute the updateIntelligense command manually
see https://xmake.io/#/plugin/more_plugins?id=configure-intellsence
— Reply to this email directly, view it on GitHubhttps://github.com/xmake-io/xmake-vscode/issues/184#issuecomment-1499879415, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIYWLMI63TFTLWY3J24RMLW757JHANCNFSM6AAAAAAWWBIJYQ. You are receiving this because you authored the thread.Message ID: @.***>
Regarding the compilation problem. With only the command line tools installed and not xcode, clang doesn’t have any path the right includes. Not sure how to fix this.
Will trying installing the massive, unused blob that is Xcode.
From: ruki @.> Reply-To: xmake-io/xmake-vscode @.> Date: Thursday, April 6, 2023 at 7:59 PM To: xmake-io/xmake-vscode @.> Cc: Lewis Levin @.>, Author @.***> Subject: Re: [xmake-io/xmake-vscode] compile_commands.json not created (Issue #184)
Only edit and save xmake.lua to trigger the compile_commands generation, or execute the updateIntelligense command manually
see https://xmake.io/#/plugin/more_plugins?id=configure-intellsence
— Reply to this email directly, view it on GitHubhttps://github.com/xmake-io/xmake-vscode/issues/184#issuecomment-1499879415, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIYWLMI63TFTLWY3J24RMLW757JHANCNFSM6AAAAAAWWBIJYQ. You are receiving this because you authored the thread.Message ID: @.***>
If compile_commands is already working, I will close this issue. For different issue, please open a separate issue. also this seems to be a toolchain issue, please install the full toolchain or xcode.
Xmake Version
v2.7.8+20230406
Operating System Version and Architecture
MacOS Venture 13.3
Describe Bug
compile_commands.json is not created in the project .vscode directory.
I had previously manually edited c_cpp_properties.json during my miserable attempt to use CMake (not going back there...).
It looks like this:
target("hex") set_kind("binary") add_files("src/hex.cpp") set_languages("cxx14") set_optimize("faster")
Error: there is no registered task type 'cppbuild'. Did you miss installing an extension that provides a corresponding task provider?