#Strange behavior of compiler version?!
34 messages ยท Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
You have multiple different compilers installed
Yes, but why isn't is synchronous?
That's the issue with IDEs, they do their own magic. Who knows how it selects the compiler
Delete one of them perhaps
I guess that's the only option I have
@unborn tinsel Also another question: Where (path) did you install your GCC compiler? Is there some kind of structure you should have when installing compilers or something else?
The place where a file or folder lives
That's a path, but there's "the" PATH ๐
It's a system setting, a list of paths
When you run an exe without specifying an absolute path, such as g++, it gets searched for in the PATH
So this means you have GCC 13 added to the PATH, and either don't have GCC 14 added at all, or it's added after GCC 13
Do you mean the environment variables? I only added GCC 14, not GCC 13?
Yes
Well it seems otherwise
Run echo $env:PATH in the terminal, show what it prints
- C:\Program Files\PowerShell\7
- C:\Program Files\Python312\Scripts\
- C:\Program Files\Python312\
- C:\Program Files\Eclipse Adoptium\jdk-21.0.6.7-hotspot\bin
- C:\Program Files\Python311\Scripts\
- C:\Program Files\Python311\
- C:\WINDOWS\system32
- C:\WINDOWS
- C:\WINDOWS\System32\Wbem
- C:\WINDOWS\System32\WindowsPowerShell\v1.0\
- C:\WINDOWS\System32\OpenSSH\
- C:\Program Files\Java\jdk-21\bin
- C:\Program Files\TortoiseSVN\bin
- C:\Program Files\Git\cmd
- C:\Program Files\PowerShell\7\
- C:\Program Files\Docker\Docker\resources\bin
- C:\mingw64\bin
- C:\Program Files\MySQL\MySQL Shell 8.0\bin\
- C:\Users\dagli\AppData\Local\Microsoft\WindowsApps
- C:\Program Files\JetBrains\IntelliJ IDEA 2023.2.2\bin
- C:\Program Files\JetBrains\CLion 2023.2.2\bin
- C:\Users\dagli\AppData\Local\Programs\Microsoft VS Code\bin
- C:\Users\dagli\AppData\Local\Programs\oh-my-posh\bin
- C:\Program Files\JetBrains\PyCharm 2023.3\bin
- C:\Users\dagli\AppData\Local\JetBrains\Toolbox\scripts
- C:\Users\dagli\AppData\Local\Microsoft\WindowsApps
- C:\mingw64\bin
And run gcm g++ too, it should show you where it found this command
CommandType Name Version Source
Application g++.exe 0.0.0.0 C:\mingw64\bin\g++.exe
That should be your gcc 13
its clion, so its cmake that selects it
you can manually change it in toolchain settings
I'm guessing it passess its own flags to cmake, overriding the compiler. But who knows
you can tell it to do so
eg.
you can either select it or use whatever it detects
im guessing it just uses PATH to detect the compiler
Apparently not tho, or OP wouldn't see two different compilers
did op change the PATH for this?
or maybe CLion goes trough all of them and selects the latest one?
๐คทโโ๏ธ