Set Up C/C++ Development on iPad with iSH Shell

iSH Shell app running C/C++ code on iPad terminal

Do you want to use a terminal on your iPad?

I recommend iSH Shell.

You can install packages on your iPad and it works on the offline.

iSH Shell App Store listing on an iPad

Step 1. Download iSH shell

https://apps.apple.com/kr/app/ish-shell/id1436902243?l=en-GB

Step 2. Install APK packages

apk update
apk add gcc g++ make musl-dev
apk add git
apk add vim

Step 3. Install zsh

apk add zsh curl git
sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
iSH terminal installing curl, Git, Zsh, and Oh My Zsh on an iPad

And set zsh as default

ask add shadow
passwd
chsh -s /bin/zsh

To run chsh, you have to set your password. But on the iSH shell, you haven’t set any password. So please set a new password by running passwd.

And then run chsh -s /bin/zsh

Step 4. Write C++ Code

vim hello.cpp
#include <iostream>;
using namespace std;
int main() {
cout &lt;&lt; “Hellow from iPad” &lt;&lt; endl;
return 0;
}
g++ hello.cpp -o hello
./hello
iSH terminal compiling and running a C++ Hello World program on an iPad

Isn’t it cool? 😎 Happy c++ coding on your iPad on the offline!

Comments

Leave a Reply

Discover more from Shawn

Subscribe now to keep reading and get access to the full archive.

Continue reading