Use the ipad to write C + + program, build C + + Environment
1 Installing the Deb pack inside the Cydia
Note: Change to developer in cydia-software source-settings, otherwise some Deb search is not found
Openssh,openssl
wget (Download tool)
Aptitude and APT 0.6 Transitional (Deb bag tools)
Unzip and zip (uncompressed and compressed packaging tools)
2 Connect the ipad with putty (The following steps can be done directly on the ipad without a computer, but there must be a network in the setup process, see article)Let's say your IPad IP address is 192.168.1.104.
Putty Download: Http://putty.very.rulez.org/latest/x86/putty.exe
Connect with WiFi
Connection type: SSH selected (default)
Port selection 22 (default)
Press Open (default)
After PuTTY connect 192.168.1.104
Login to play Root
Password (assuming you didn't change your password) hit Alpine
Note: Whether it is putty or the end of this article said the ipad command line, enter the password will not display characters, after the completion of the press ENTER can
Note: Whether it's putty or the ipad command line at the end of this article, the default path to log in to the root account is/var/root/
3 Install the iphone gcc and signature tool
In the Putty (Putty the right mouse button paste):
wget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb dpkg-i libgcc_4.2-20080410-1-6_ Iphoneos-arm.deb apt-get Install IPHONE-GCC ldid makethe last sentence is likely to occur in two errors:
1, if the hint can not find apt command, search in cydia apt, install apt 0.6 transitional,apt 0.7 (apt-key), apt 0.7 HTTPS method,apt 0.7 strict,apt0.7 Strict (l IB), Aptitude
Note: Although I do not know which is the role, but the reverse is good, and later on the programming, they are installed
2, reference http://blog.163.com/cobyeah@126/blog/static/140137653201142354756503/
When you use Apt-get for install or update of your software, you sometimes receive the following message:
E:could not get Lock/var/lib/dpkg/lock-open (one Resource temporarily unavailable) e:unable to lock the administration D Irectory (/var/lib/dpkg/), is another process using it?
Delete the/var/lib/dpkg/lock file, you can
4 Download Sys32libheader.tgz
115 Download: HTTP://115.COM/FILE/BHY27GHJ
Copy to/var/root
5 Installing the 3.2 SDK (iPad) header file
In the Putty (Putty the right mouse button paste):
Mkdir-p/var/toolchain cd/var/toolchain tar xzvf/var/root/sys32libheader.tgz cp-p/var/toolchain/sys32/usr/lib/ libstdc++.*/usr/lib/cd/usr/lib/ln-s Libsystem.b.dylib Libsystem.dylib
to this, the C + + programming environment is set up, then use a small program to explain how to program two, how to program
Writing HelloWorld.cpp on a computer with Notepad
#include using namespace std; int main () {cout << "Hello world!" << Endl, return 0;}
Copy the HelloWorld.cpp to/var/root/,
In the Putty (Putty the right mouse button paste):
arm-apple-darwin9-g++-I "/var/toolchain/sys32/usr/include"-i "/var/toolchain/sys32/usr/include/c++/4.2.1"-i "/var /toolchain/sys32/usr/include/c++/4.2.1/armv7-apple-darwin9 "-L"/var/toolchain/sys32/usr/lib "Helloworld.cpp-o HelloWorld ldid-s HelloWorld./helloworld
At this point, you can use file management software to see
This is the compiled program that can be run with./helloworld (./= Current path)
Summary:
Compile:
arm-apple-darwin9-g++-I "/var/toolchain/sys32/usr/include"-i "/var/toolchain/sys32/usr/include/c++/4.2.1"-i "/var /toolchain/sys32/usr/include/c++/4.2.1/armv7-apple-darwin9 "-L"/var/toolchain/sys32/usr/lib "program name. Cpp-o Program Name Ldid- S Program Name
Perform:
./Program Name
third, code writing software
From the above on the computer to create a. cpp file can be seen, now the ipad can do is only a C + + environment, compile and so on, write code requires other programs
The original post recommended is VI improved, you can search and install in Cydia, enter the way is in putty or command line input vim, exit mode is a continuous fast input two times Capital Z, detailed operation can be referred to http://www.caole.net/diary/vim.html
Online can find a lot of ipad code writing software, I am using textastic (figure and download see last)
Iv. about the ipad-side command line
Above all is on the computer through the Putty control ipad compiles, executes the program. But if the computer is around any time, don't use the ipad programming, and then talk about how to do it on the ipad
Search for and install mobileterminal in Cydia
Open Terminal, click on the lower right corner of I can enter the program settings, manage the quick input and gesture operation
Then all the steps are the same as the putty on the computer.
Note: Must have network connection when setting up the environment, such as installing the iphone GCC and signing tool
wget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb need to download online
How the ipad end command line enters the root account:
Enter Login
Login to play Root
Password (assuming you didn't change your password) hit Alpine
For more information on command line use, refer to:
Http://blog.sina.com.cn/s/blog_51d3553f0100xrxz.html
code Writing software: Textastic
A code-writing software, very convenient, the interface is as follows
That Assistivetouch in the middle is what I did to protect the home key when I cut the screen, nothing to do with the program.
I did not install Ikeywi HD, because it felt great typing comfortable, and this software with character input (keyboard above the row, Four corners of the symbol sliding input)
To facilitate the compilation of programs, you can set up shortcut input
In IFile (a file management software that should be known), find the path to. cpp, by bookmark, press "+"
Copy/var ... After the path, as figure
In the terminal, press the lower right corner i, open the menu, shortcut menu-New, shortcut action input "CD", Paste, you can later in the terminal of the lower left corner shortcut input
textastic Download: Textastic-v4.0.2.ipa (5206 K) Download number of times: 14