GUIDE (GAIT Universal IDE) is a small integrated development environment developed by the GAIT research group of Beihang University specifically for NOI contestants, supporting the C/C++/Pascal programming languages.
Note
The NOI Linux 2.0 activated on September 1, 2021 no longer includes GUIDE.1
Installation
Windows
See https://www.noi.cn/xw/2009-03-23/714714.shtml.
Linux
See https://www.noi.cn/xw/2009-03-23/714714.shtml or install it according to the following steps.
Required shared library files and package names
| Shared library | Arch package name | Debian package name | Fedora package name | openSUSE x86 package name | openSUSE x86_64 package name |
|---|---|---|---|---|---|
| libpng12.so.0 | lib32-libpng12 | libpng12 | libpng12 | libpng12-0 | libpng12-0-32bit |
| libSM.so.6 | lib32-libsm | libsm6 | libSM | libSM6 | libSM6-32bit |
| libICE.so.6 | lib32-libice | libice6 | libICE | libICE6 | libICE6-32bit |
| libXi.so.6 | lib32-libxi | libxi6 | libXi | libXi6 | libXi6-32bit |
| libXrender.so.1 | lib32-libxrender | libxrender1 | libXrender | libXrender1 | libXrender1-32bit |
| libXrandr.so.2 | lib32-libxrandr | libxrandr | libXrandr | libXrandr2 | libXrandr2-32bit |
| libfreetype.so.6 | lib32-freetype2 | libfreetype6 | freetype | libfreetype6 | libfreetype6-32bit |
| libfontconfig.so.1 | lib32-fontconfig | libfontconfig1 | fontconfig | libfontconfig1 | libfontconfig1-32bit |
| libXext.so.6 | lib32-libxext | libxext6 | libXext | libXext6 | libXext6-32bit |
| libX11.so.6 | lib32-libx11 | libx11-6 | libX11 | libX11-6 | libX11-6-32bit |
| libz.so.1 | lib32-zlib | zlib1g | zlib | libz1 | libz1-32bit |
| libgthread-2.0.so.0 | lib32-glib2 | libglib2.0-0 | glib2 | libgthread-2_0-0 | libgthread-2_0-0-32bit |
| libglib-2.0.so.0 | lib32-glib2 | libglib2.0-0 | glib2 | libglib2_0-0 | libglib2_0-0-32bit |
| libstdc++.so.6 | lib32-gcc-libs | libstdc++6 | libstdc++ | libstdc++6 | libstdc++6-32bit |
| libgcc_s.so.1 | lib32-gcc-libs | lib32gcc1 | libgcc | libgcc_s1 | libgcc_s1 |
| librt.so.1 | lib32-glibc | libc6 | glibc | glibc | glibc-32bit |
| libpthread.so.0 | lib32-glibc | libc6 | glibc | glibc | glibc-32bit |
| libdl.so.2 | lib32-glibc | libc6 | glibc | glibc | glibc-32bit |
| libm.so.6 | lib32-glibc | libc6 | glibc | glibc | glibc-32bit |
| libc.so.6 | lib32-glibc | libc6 | glibc | glibc | glibc-32bit |
Installation on Debian or Ubuntu
sudo apt install -y libpng12 libsm6 libice6 libxi6 libxrender1 libxrandr libfreetype6 libfontconfig1 libxext6 libx11-6 zlib1g libglib2.0-0 libglib2.0-0 libstdc++6 lib32gcc1 libc6
wget -c http://download.noi.cn/T/noi/GUIDE-1.0.2-ubuntu.tar
tar -xvf GUIDE-1.0.2-ubuntu.tar
cd GUIDE-1.0.2-ubuntu
echo "install:\n\tinstall -Dm755 -t /usr/bin GUIDE\n\tinstall -Dm644 -t /usr/share/ lang_en.qm\n\tmkdir -p /usr/share/apis/ && cp -r apis/* /usr/share/apis/\n\tmkdir -p /usr/share/doc/GUIDE/ && mkdir -p /usr/share/doc/GUIDE/html/ && cp -r doc/* /usr/share/doc/GUIDE/html/" > Makefile
sudo apt install -y checkinstall
sudo checkinstall --pkgname "GUIDE" --pkgversion "1.0.2" -y
Installation on openSUSE
Install opi according to the method given by openSUSE/opi.
Then (32-bit users should remove -32bit themselves):
sudo opi checkinstall
sudo zypper install -n {libpng12-0,libSM6,libICE6,libXi6,libXrender1,libXrandr2,libfreetype6,libfontconfig1,libXext6,libX11-6,libz1,libgthread-2_0-0,libglib2_0-0,libstdc++6,libgcc_s1,glibc}-32bit
wget -c http://download.noi.cn/T/noi/GUIDE-1.0.2-ubuntu.tar
tar -xvf GUIDE-1.0.2-ubuntu.tar
cd GUIDE-1.0.2-ubuntu
echo "install:\n\tinstall -Dm755 -t /usr/bin GUIDE\n\tinstall -Dm644 -t /usr/share/ lang_en.qm\n\tmkdir -p /usr/share/apis/ && cp -r apis/* /usr/share/apis/\n\tmkdir -p /usr/share/doc/GUIDE/ && mkdir -p /usr/share/doc/GUIDE/html/ && cp -r doc/* /usr/share/doc/GUIDE/html/" > Makefile
sudo checkinstall --pkgname "GUIDE" --pkgversion "1.0.2" -y -rpmi
Editing files
Click the “New File” button on the toolbar at the top of the page (or use the Ctrl+N shortcut) to create a new file.
By default, GUIDE's code font is not monospaced, which looks very unattractive, so the font needs to be changed in the settings.
In Edit -> Options -> Syntax Highlighting Settings, click the “All Fonts” button to switch the editor font.
Note that for new files that have not been saved, the font is still the default font. Therefore, it is recommended to save the file before starting to edit it (click the “Save” button on the toolbar, or press the Ctrl+S shortcut), and then edit it.
Compiling and running
After editing the source code, click the “Compile” button on the toolbar (or press the F7 shortcut) to compile it.
Changing compilation options
GUIDE does not provide a function for setting default compilation options; users can only change the compilation options for a specific file.
Right-click the tab of the file whose compilation options you want to change, and select the Set Compilation Command option to change that file's compilation options.
If the source code compiles normally, click the “Run” button on the toolbar (or press the Ctrl+F5 shortcut) to run the program.
Debugging
The debugging function built into GUIDE has many bugs (such as crashes occurring midway through program execution), so it is not recommended to use GUIDE's debugging function directly.
It is recommended to use gdb directly in the terminal for debugging.