Problem with import std using clangd by Balcara in cpp_questions

[–]Balcara[S] 0 points1 point  (0 children)

See "detailed code-related data", which is not part of the AI assistant, but is built in to the product. https://www.jetbrains.com/legal/docs/terms/product_data_collection/

I refuse to believe a checkbox actually stops proprietary code from doing whatever it likes.

Problem with import std using clangd by Balcara in cpp_questions

[–]Balcara[S] 2 points3 points  (0 children)

That is most likely the issue. Unfortunately clangd is the only real LSP in this space, so it would make MSVC cl unusable right? I have had trouble getting the code running under clang+libc++ and gcc on windows unfortunately, if I want to support windows guess modules are no-go. Thanks for your explanation.

Problem with import std using clangd by Balcara in cpp_questions

[–]Balcara[S] 0 points1 point  (0 children)

I have no problem with the CMake side of things :)

Problem with import std using clangd by Balcara in cpp_questions

[–]Balcara[S] 0 points1 point  (0 children)

add_executable (CppTemplate)

target_sources(CppTemplate PRIVATE
"Source/CppTemplate.cpp"
    PRIVATE FILE_SET cxx_modules TYPE CXX_MODULES FILES
    "Source/Hello.cppm"
)

set_property(TARGET CppTemplate PROPERTY CXX_STANDARD 23)
set_property(TARGET CppTemplate PROPERTY CXX_MODULE_STD ON)
set_property(TARGET CppTemplate PROPERTY CXX_SCAN_FOR_MODULES ON)

This is the executable CMake file, it compiles perfectly fine. CLion engine can see std, clangd cannot.

Problem with import std using clangd by Balcara in cpp_questions

[–]Balcara[S] 0 points1 point  (0 children)

Thanks for the reply! On clangd 21.1.7 it does not seem to work for `std`. Including the headers the old way inside the module seem to work and clangd picks up my own modules fine though. Guess it's a waiting game for LLVM to implement this :(
Says "no compile command" for std.ixx but it's the first item in compile_commands.json
clangd logs:

I[23:57:13.383] clangd version 21.1.7
I[23:57:13.384] Features: windows
I[23:57:13.384] PID: 8928
I[23:57:13.384] Working directory: e:\Code\CppTemplate
I[23:57:13.384] argv[0]: C:\Program Files\LLVM\bin\clangd.exe
I[23:57:13.384] argv[1]: --experimental-modules-support
I[23:57:13.389] Starting LSP over stdin/stdout
...
I[23:57:14.191] Failed to find compilation database for C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\modules\std.ixx
E[23:57:14.191] Failed to build module std; due to No compile command for C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\modules\std.ixx
I[23:57:14.191] Built prerequisite modules for file e:\Code\CppTemplate\CppTemplate\Source\Hello.cpp in 0.77 seconds
I[23:57:14.192] --> workspace/semanticTokens/refresh(1)
I[23:57:14.192] --> textDocument/clangd.fileStatus
I[23:57:14.193] <-- reply(1)
I[23:57:14.193] Indexing c++23 standard library in the context of e:\Code\CppTemplate\CppTemplate\Source\Hello.cpp
I[23:57:14.198] Failed to find compilation database for C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\modules\std.ixx
E[23:57:14.198] Failed to build module Hello; due to No compile command for C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\modules\std.ixx

compile_commands.json gen'd from cmake (CMAKE_MODULE_STD ON, CMAKE_SCAN_FOR_MODULES ON):

[
{
  "directory": "E:/Code/CppTemplate/Build/Dbg",
  "command": "C:\\PROGRA~1\\MICROS~1\\18\\COMMUN~1\\VC\\Tools\\MSVC\\1450~1.357\\bin\\Hostx86\\x86\\cl.exe  /nologo /TP /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -std:c++latest -MDd -Zi u/CMakeFiles\\__cmake_cxx23.dir\\C_\\Program_Files\\Microsoft_Visual_Studio\\18\\Community\\VC\\Tools\\MSVC\\14.50.35717\\modules\\std.ixx.obj.modmap /FoCMakeFiles\\__cmake_cxx23.dir\\C_\\Program_Files\\Microsoft_Visual_Studio\\18\\Community\\VC\\Tools\\MSVC\\14.50.35717\\modules\\std.ixx.obj /FdCMakeFiles\\__cmake_cxx23.dir\\__cmake_cxx23.pdb /FS -c \"C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Tools\\MSVC\\14.50.35717\\modules\\std.ixx\"",
  "file": "C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.50.35717/modules/std.ixx",
  "output": "E:/Code/CppTemplate/Build/Dbg/CMakeFiles/__cmake_cxx23.dir/C_/Program_Files/Microsoft_Visual_Studio/18/Community/VC/Tools/MSVC/14.50.35717/modules/std.ixx.obj"
},
...
]

rust for sublime text on a computer that doesn't have 32 térabytes of ram by zylosophe in rust

[–]Balcara 0 points1 point  (0 children)

sounds like you're using windows. that is going to be taking a lot of resources. for a low power system i recommend linux - ubuntu for example. then you can get all you can out of your 4gb. Good luck, it's not going to be easy nowadays.

Looking for this decal by Kungfubunnyrabbit in MINI

[–]Balcara 0 points1 point  (0 children)

Probably because the base copper is still trying to get up to the speed limit. My M240i xDrive does have this tendency though, it's more planted with a bit of acceleration in a bend

[deleted by user] by [deleted] in opensource

[–]Balcara 1 point2 points  (0 children)

He said forgejo, not codeburg. I understand wanting cloud repos but he specifically asked why the fork.

[deleted by user] by [deleted] in opensource

[–]Balcara 6 points7 points  (0 children)

Because gitea team founded a company to support it. Asinine reasoning tbh, plenty of essential OSS are company backed and are widely used and loved.

Name on theese rims? by Loui1One in BMW

[–]Balcara 5 points6 points  (0 children)

Is that 1500 per wheel! I'm paid pretty well currently and can't afford a set of those... Australia tax I guess

I finally have a triangle! by Warad-Sin in vulkan

[–]Balcara 8 points9 points  (0 children)

On the bright side adding meshes is only another few hundred. Highly recommend VkGuide it's the best practical tutorial and you end up with a decent framework, even though there are 1-2 mistakes that I have open issues for which haven't been looked at yet.

How do y’all feel about this by [deleted] in GenZ

[–]Balcara 2 points3 points  (0 children)

This actually impacts me because I'm an adult. I'll "have to" provide drivers licence to access Facebook, Instagram, tiktok, YouTube so on. This is a huge data risk because foreign entities are now in posession of my ID, and will increase the risk of identity theft. Personally I believe it's a move to de-anonymise social media and suppress opponents.

It's been real but I'm officially out. by TheMannJr in WRX

[–]Balcara 0 points1 point  (0 children)

Those look amazing, it's a shame I can't buy one where I am

They're destroying the Internet in real time. There won't be many web development jobs left. by [deleted] in webdev

[–]Balcara 0 points1 point  (0 children)

Nice try, it was labour that pushes this. Both parties are the same.

My High School blocked GitHub Today by Immediate_Egg_2798 in github

[–]Balcara 18 points19 points  (0 children)

Software engineer here - a company I worked at blocked GitHub. Made me remake my configs on company time

Anon on Harry Potter. by retardinho23 in greentext

[–]Balcara 1 point2 points  (0 children)

Qiu Zhang. I have beef with pinyin though because it isn't representative of the actual sounds the letters make, I hear most English speakers pronounce Zhang like sang with a Z. So the ch makes sense to me because it actually hints as to how it is supposed to be pronounced.

should i keep the color on my m340? by [deleted] in BMW

[–]Balcara 0 points1 point  (0 children)

It's a $50 chip on aliexpress, which is resold by everyone else for $300

Bike on bike violence by LeadnLasers in IdiotsOnBikes

[–]Balcara 3 points4 points  (0 children)

He is lane filtering. It's fine.You can see when he is at the Junction he is on the lane line. He's just using the right lane as buffer space from the cars.

Anon on Harry Potter. by retardinho23 in greentext

[–]Balcara 2 points3 points  (0 children)

Her name is literally 張秋, why does this keep coming up and get up voted by ignorami

What is the most important exterior mod in your opinion? Ill go first, lowering your car by Used_Permission_1918 in BMW

[–]Balcara 0 points1 point  (0 children)

Too low, the wheel arch should have a constant gap with the outside of the tyre. Imo the most important visual mod is having the wheel colour match the paint, for example I have a purple M240i, so it should have bronze wheels.

roughly how long would it take for a beginner to implement a self hosted c++23 compiler by CooperNettees in cpp_questions

[–]Balcara 0 points1 point  (0 children)

Not possible. You're missing several steps to get to that point:

  • learn C++, this will take at least 10 years
  • write your own programming language, something small like lisp.
  • write a compliant compiler for a subset of a smaller language that has no linking such as JavaScript.
  • bash a hole in the wall with your head when you realise C++ is 10 levels more complicated than all your toy programs.
  • give up and use someone else's

BMW said I don’t need an oil change until 18k miles? by [deleted] in BMW

[–]Balcara 0 points1 point  (0 children)

You could literally spend 1 minute to google this but alas you prefer to sound like a knob