GUIDE

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 libraryArch package nameDebian package nameFedora package nameopenSUSE x86 package nameopenSUSE x86_64 package name
libpng12.so.0lib32-libpng12libpng12libpng12libpng12-0libpng12-0-32bit
libSM.so.6lib32-libsmlibsm6libSMlibSM6libSM6-32bit
libICE.so.6lib32-libicelibice6libICElibICE6libICE6-32bit
libXi.so.6lib32-libxilibxi6libXilibXi6libXi6-32bit
libXrender.so.1lib32-libxrenderlibxrender1libXrenderlibXrender1libXrender1-32bit
libXrandr.so.2lib32-libxrandrlibxrandrlibXrandrlibXrandr2libXrandr2-32bit
libfreetype.so.6lib32-freetype2libfreetype6freetypelibfreetype6libfreetype6-32bit
libfontconfig.so.1lib32-fontconfiglibfontconfig1fontconfiglibfontconfig1libfontconfig1-32bit
libXext.so.6lib32-libxextlibxext6libXextlibXext6libXext6-32bit
libX11.so.6lib32-libx11libx11-6libX11libX11-6libX11-6-32bit
libz.so.1lib32-zlibzlib1gzliblibz1libz1-32bit
libgthread-2.0.so.0lib32-glib2libglib2.0-0glib2libgthread-2_0-0libgthread-2_0-0-32bit
libglib-2.0.so.0lib32-glib2libglib2.0-0glib2libglib2_0-0libglib2_0-0-32bit
libstdc++.so.6lib32-gcc-libslibstdc++6libstdc++libstdc++6libstdc++6-32bit
libgcc_s.so.1lib32-gcc-libslib32gcc1libgcclibgcc_s1libgcc_s1
librt.so.1lib32-glibclibc6glibcglibcglibc-32bit
libpthread.so.0lib32-glibclibc6glibcglibcglibc-32bit
libdl.so.2lib32-glibclibc6glibcglibcglibc-32bit
libm.so.6lib32-glibclibc6glibcglibcglibc-32bit
libc.so.6lib32-glibclibc6glibcglibcglibc-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.

Footnotes

  1. NOI Linux 2.0 released and to be officially enabled on September 1! ↩

This content comes from OI Wiki: GUIDE. See the original for authors and revision history. AIOJ has adapted the formatting, in-site links, and resource paths.

Content is shared under CC BY-SA 4.0 and SATA license; additional terms are governed by the original notice. Thanks to the OI Wiki authors and contributors; per the SATA terms, please visit the OI Wiki repository and star it to show your support.