"Swift toolchain path is not configured" on Clion? (Windows version) - swift

So I installed CLion so that I could use write swift code on Windows. After installing both Clion and Swift toolchain, I got the message "swift toolchain path not configured. The path Clion originally provided did not work and I have no clue what path I should point Clion to. Any clues?
I tried changing the path provided but to no avail.

Related

Libraries available to wsl not to vscode on windows

So I was doing gpu programming using cuda and had installed the same for my wsl on windows. So the code I wrote works on wsl, printing the correct output. But the libraries such as bits/stdc++.h and sys/time.h cant be found by vscode. Why doesnt my wsl not produce any errors and how to correct this?
compiling on wsl using nvcc
libraries cant be found
So I am thinking of adding the requierd libraries to micrososft visual studio folder in program files. But I am unable to get the files for sys/time.h. Did I do some error while installing the libraries? I have Microsoft visual studio version 2022.

Installing STM32CubeProgrammer on macOS Big Sur

I'm trying to install STM32CubeProgrammer on MacOS BigSur, I have followed this steps from the website: https://community.st.com/s/question/0D50X0000BmnqrB/how-to-run-stm32cubeprogrammer-on-macos-catalina-10151-19b88?t=1620993010340. Although when I run the program with terminal, it gives me an error saying that I couldn't found jre folder. But when downloading from the website, it comes with the jre folder, SetupSTM32CubeProgrammer-2.7.0.exe and SetupSTM32CubeProgrammer-2.7.0.app.
This is the error line:
JRE Folder not found!
jre not found
macOS GUI setup doesn't work, although seems it can be executed via packaged console executable.
Use appropriate version for the command:
./SetupSTM32CubeProgrammerx.y.z.app/Contents/MacOs/SetupSTM32CubeProgrammer-x_y_z_macos
Source: ST Community

How to compile something using arm-none-eabi-gcc on windows

I am trying to build a project for a raspberry pi 4, using windows 10 as the building platform, I have the compiler installed, arm-none-eabi-gcc however every piece of information I've learned about it relates to how to run it on a linux machine, and I don't really want to run a vm just to load the linux environment, so how do I run the compiler on windows 10, Do I run it from Cmd? or is there a different method to do this?
You could check this PreBuilt GNU Toolchain for building natively on Win10.
Otherwise you could also setup a WSL environment in your win10, then you would also be able use any linux toolchains.
You can download the IDE DS-5 Community Edition
https://developer.arm.com/tools-and-software/embedded/legacy-tools/ds-5-development-studio/editions/community-edition
You can download the toolchains:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
Then follow the steps in this tutorial:
https://developer.arm.com/tools-and-software/embedded/legacy-tools/ds-5-development-studio/resources/tutorials/getting-started-with-ds-5-ce-and-armv8-foundation-platform
https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/running-bare-metal-software-on-the-raspberry-pi-3-using-arm-ds-5
You should have the arm-none-eabi-gcc.exe for Windows Compile.
Also, you have the linux environment like MinGW and use installed terminal(xterm).
then, you have to copy the .so files into MinGW /lib or /usr/lib folder under C:/MinGW.
Hope this would be helpful for you.

Couldn't start client Rust Language Server

I'm trying to figure out how to use rustc & cargo from my WSL. I use VS Code and Rust (rls) plugin and can compile my code but there is a problem with RLS:
Couldn't start client Rust Language Server
Rustup not available. Install from https://www.rustup.rs/
How i can solve this problem?
Set rust-client.rustupPath in VSCode settings:
{
"rust-client.rustupPath": "~/.cargo/bin/rustup"
}
If you're using WSL on Windows then make sure you edit Rust extension WSL settings, not user/local settings.
Tutorial:
I had this problem as well with WSL and Visual Studio Code. The problem seems to stem from the fact that the Rust Language Server needs to find rustup in your path. We both probably followed the same path of using a package manager to install cargo, and therefore, the rust compiler tools. This does not include rustup which you can actually use to keep the rust toolchain up-to-date. rustup also appears to be the preferred method of installing the rust toolchain on your system.
After installing rustup with the default setup, you should see a .rustup directory in your home directory. This is where the toolchain lives. The install text all stated that it would add the toolchain to your environment path after logging out and back in, but I didn't have luck with this. I'm currently using fish instead of bash and had to update the configuration to include the toolchain at startup. Once I did that, I was able to have VSCode properly install and run the RLS.
This worked for me for in a remote SSH environment with Ubuntu 20.04
Edit .profile and .bashrc files in the user home directory
In .profile, comment the following line:
export PATH="$HOME/.cargo/bin:$PATH"
In both, add the following line:
[[ ":$PATH:" != *":$HOME/.cargo/bin:"* ]] && PATH="$HOME/.cargo/bin:${PATH}"
Reboot.
Even though if I run:
which rustup
/Users/justincalleja/.cargo/bin/rustup
A simple entry of rustup in the VSCode settings for:
"Rust-client: Rustup Path Path to rustup executable. Ignored if rustup
is disabled."
wasn't enough and I had to put the absolute path to the rustup binary as shown above. After doing so, I reloaded the window and was then asked to download missing components (or dependencies - the prompt is gone now I forgot). After doing this, the VSCode plugin seems to be working fine. I can format the code at least.
So it looks like it's some mismatch with VSCode's PATH and the PATH on my system. I'm not sure what it is but if you just want to get the extension to work, try using the absolute path to rustup in your Settings.
(Note: source "$HOME/.cargo/env" is added automatically to your startup files like .bashrc. First thing I tried was adding it to the startup file of zsh; the shell I'm using and to which it wasn't added. But that doesn't work either. I'm using rustc 1.49.0 (e1884a8e3 2020-12-29) ).
So... I'm running Rust on Windows 10 and I experienced this same issue. My Rust version is 1.24.3, my VSCode version is 1.63.2.
The first thing you need to do is add "%USERPROFILE%.cargo\bin" to your environment variables
The next solution that worked for me can be found in this tutorial: Rust on Windows and Visual Studio Code
i am running VSCode on mac, and using remote development.the remote server is
ubuntu 20. i had this problem, added rust-client.rustupPath to vscode settings and killed the vscode-server on remote server to fix this problem. now it work.

Version mismatch between tsc compiler and VS Code's language service

I just started playing with Visual Studio Code and when I created a new file called index.html, I am shown this warning message
A version mismatch between the globally installed tsc compiler (1.0.3.0) and VS Code's language service (1.8.10) has
Can someone please guide me what i have to do to fix this.
Is this serious or I can ignore. I googled but could not get much info
Thanks
I added this to my settings.json file, accessed through preferences > Workspace Settings :
"typescript.tsdk": "node_modules/typescript/lib"
now I no longer receive this error and in the bottom right corner of my screen it shows the current version of Typescript that I have installed.
[UPDATE] VS Code 1.6 now ships with TypeScript 2.0.3.
I just installed the latest Typescript, currently v.2.0.3, and installed VS Code v.1.5.3 on macOS Sierra. For some reason, exactly following the official doc didn't work for me.
Here's how I made it work:
After having installed the latest version globally:
npm i -g typescript, I added the following line to my settings.json file (opened by cmd + ,):
"typescript.tsdk": "/usr/local/lib/node_modules/typescript/lib",
Hope this helps someone else.
[update] as #ptpaterson mentioned on the comment below, on Windows the path is: "typescript.tsdk": "C:/Users/{user_name}/AppData/Roaming/npm/node_modules/typescript/lib/"
You have to change the version of TypeScript that Visual Code is using to match the version you have installed:
https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions
The above is taken from the link:
If you want to use a newer version of TypeScript, you can define the typescript.tsdk setting (File > Preferences > User/Workspace Settings) pointing to a directory containing the TypeScript tsserver.js file.
You can find the installation location using npm list typescript, tsserver.js is usually under the lib folder.
For example:
{
"typescript.tsdk": "node_modules/typescript/lib"
}
You have to update your Typescript installation and restart Code afterwards:
npm install -g typescript
or
npm install -g typescript#1.8.10
The message should not longer appear, if it worked.
This error was being generated because I had a reference to an older installation of TypeScript in my System Path variable:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
The Visual Studio Code error was resolved when I removed this entry.
However, my TypeScript files then failed to transpile as the build action couldn't find the tsc.exe file.
When the SDK is installed (through Visual Studio or via a manual *.visx install), a tsc.exe file is installed and the PATH environment variable is updated to reference the folder that this file resides in (see above).
There is another way to transpile your files on a Windows environment by using node.js:
Install node.js. Installation packages can be found here.
Use npm to install TypeScript:
npm install -g typescript
This will add the TypeScript files to your profile AppData folder:
C:\Users\{your_user_name}\AppData\Roaming\npm\node_modules\typescript\lib
Configure your Visual Studio Code user settings.json file to reference this folder:
{
"typescript.tsdk": "C:\\Users\\{your_user_name}\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib"
}
Add / update the user PATH environment variable to reference the folder that contains the tsc.cmd file:
%USERPROFILE%\AppData\Roaming\npm
None of the solutions above worked for me - first of all this is the global tsc I want to have updated to the latest version.
After I did some investigation it turned out that the problem lies in system's PATH variables; tsc.cmd (along with tscserver.cmd) exists in these locations:
c:\Program Files\nodejs - where the npm.exe and node.exe are
%USERPROFILE%\AppData\Roaming\npm - where global packages are
What you can do is to juggle environment\user variables so the tsc command would be resolved from %USERPROFILE% first instead of Program Files.
The quick & dirty way would be just deleting tsc.cmd and tscserver.cmd from the Program Files path.
Installing v2.0.3 of typescript was not sufficient... but but then updating the version dependency on package.json worked for me.
Npm command:
npm install -g typescript#2.0.3
Updated line on package.json:
"typescript": "^2.0.3"
The cause of my experience with this issue (in VSCode 1.8 on Mac OS X 10.12.2) was that I have been using NVM and while my code was running on the NVM version, VSCode was looking at a system installation of node.
Double check which installation of npm you are using to install typescript globally. If in doubt (on linux/mac) use which tsc from the command-line to verify the location being used by VSCode.
For example, if I simply call npm i -g typescript, npm resolves to ~/.nvm/versions/node/v6.9.1/bin/npm. I had to solve the problem by calling /usr/local/bin/npm i -g typescript explicitly because VSCode looks for node in /usr/local/bin/node by default.
Install TypeScript globally to share the installation across workspaces. In this case, you install it using npm install -g typescript#next.
You then have to tell VS Code on setting.json file (File -> Preferences -> Workspace Settings) the install location using the typescript.tsdk setting. Set typescript.tsdk to the path of the lib folder containing the tsserver.js file of the installed TypeScript module.
On windows:
"typescript.tsdk": "C:/Users/<MyUser>/AppData/Roaming/npm/node_modules/typescript/lib"
On Mac:
"typescript.tsdk": "/usr/local/lib/node_modules/typescript/lib"
Installing VSCode 1.6.0 fixed the TypeScript version mismatch warning message for me.
You'd think that this being a Microsoft product they'd give the Windows paths on their website
https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions
but they don't. They only give the Unix path types.
Use:-
On windows: "typescript.tsdk": "C:/Users/YourNameHere/AppData/Roaming/npm/node_modules/typescript/lib/"
Note that forward strokes must be used even though Windows uses backstrokes for the paths!
Some other answers miss off the last forward stroke which is necessary.
You can just remove 'typescript.tsdk' and use the one embedded in Code if you don't really care about which tsdk version you use.