This article provides basic information about U++ environment and the steps needed to install it on your computer.
Table of Contents
U++ is an open source C++ framework/development environment which is at the moment best suited for small teams with ambitious projects that do the "real stuff", like engineering application to design buildings, wind farm simulation, point of sales terminals, SQL client-server office agenda, business sales or complex website backends (yes, I am listing real world examples here). It however also scales well from smallest utilities, as can be seen here.
It is designed around some rather extreme principles to maximise both developer productivity and performance.
While the complexity of C++ language cannot be abstracted out (but is definitely required to achieve both productivity AND performance goals), experienced U++ programmers might find themselves more productive doing tasks in U++ rather than using "easy to use" scripting languages like Python, which is our ultimate goal.
At the same time, U++ Core libraries provide about 3 times better performance than standard C++ library in areas like string operations and mapping, which consist of a bulk of load in many scenarios (think e.g. about processing JSON or parsing files).
On top of that is the modular system of sources and corresponding build system which make management of large projects much simpler.
One fact to summarize it all: It takes just 45 seconds to completely rebuild the U++ development environment (TheIDE) AND all the framework libraries in debug mode. (You can actually try that right after installation as TheIDE sources are part of the release).
And it has a nice cat picture in one of demonstration examples too!
U++ currently exists for Windows, X11 and MacOS platforms.
Stable releases can be found at https://sourceforge.net/projects/upp/.
U++ is currently released as LZMA compressed archive (.7z for Windows, .xz for POSIX / MacOS).
In Linux, U++ has to be compiled for the target distro while satisfying dependencies. However, the process is quick and mostly automated for majority of popular Linux flavors. After unpacking the archive, cd to the upp folder and run the
The script should be able to detect your Linux distribution and suggest the command to install required dependencies. It can even install these if you do not mind sharing your sudo password, or you can just copy the command to separate terminal and run it yourself. The same
./install process should also work fine for FreeBSD and OpenSolaris derived systems.
After that, the development environment will get compiled from the source code, which should take a couple of minutes on modern x86 CPUs (and about 15 minutes on Raspberry PI 4):
./theide binary is produced, which could be started immediately with the script and you should see something like this:
Note: Unless you move theide binary somewhere else, it will not write anything outside upp directory. Once you get bored with U++, just delete upp.
After this point, working with TheIDE is essentially the same on all platforms.
In OpenBSD, you need to resolve dependencies manually before running the
./install script by running:
pkg_add bash pkgconfig
(This should work as long as you have installed desktop environment before installing U++.)
It is also necessary to increase the allowed memory sizes in /etc/login.conf to:
otherwise compiler will run out of memory. After that, follow instructions for Linux.
In Windows, TheIDE is precompiled and U++ comes with all dependencies needed, including clang compiler. Simply unpack the archive and start theide.exe.
Once again, U++ is self contained and nothing will be written outside the upp directory. After starting theide.exe, you should see essentially the same dialog as with Linux:
In MacOS, TheIDE is precompiled in the archive, however U++ requires C++ toolchain to build applications. You can find a description of how to install the toolchain, e.g., here.
Some other tools and libraries can be installed with homebrew. The following packages are recommended (as in they might be required in certain contexts):
To start TheIDE, you simply launch theide.app from the unpacked archive:
You should now see essentially the same dialog as on other platforms:
Without going into much details, we shall now describe what you see in the dialog.
Assembly is basically a list of directories to look for source code modules. The term for such modules is package. Package is basically a directory with C++ source files and some meta information that describes how to compile the package and dependencies on other packages.
The Assembly list you see in the dialog is editable, but after you start TheIDE for the first time, it creates a predefined set of assemblies based on sources that come with the release. Here,
examples contain mostly more complex demonstration examples to "show the power of U++" (and some cat pictures), while
reference contains nearly 200 examples demonstrating various aspects of U++ framework.
tutorial are examples that accompany several multi-step tutorials on U++ website.
uppsrc is assembly that contains basic U++ libraries and utilities and source code of TheIDE itself.
MyApps is assembly that is prepared for your initial experiments with U++.
Besides "canonical" modules, U++ releases also come with huge community contributed content called
bazaar. At the moment, quality and usefulness of bazaar code widely varies, so use with caution.
examples-bazaar are demonstration examples of these packages, while
MyApps-bazaar is assembly ready for your projects that also contains
Let us now load, compile and run one of the examples. Select
examples and in the list of packages, choose
Days (of course, you can choose any other example, but
Days is what the following screenshots show). TheIDE will load the project and you should see this:
In the left top corner, there is a list of packages.
Days is the package that you have selected (it is the main package), other packages listed are its direct or indirect dependencies. Under that list area is a list of files of currently selected package. Note that this means that all source files of U++ project, including all source files of U++ framework, are usually 2 mouse clicks away (you actually have to be somewhat careful not to damage framework files by editing them).
The center of window obviously contains the source code of current file. On the right is something called "navigator" - this is a search tool based on C++ source code analysis of the whole project.
To compile and run the project, press Ctrl+F5 or choose "Execute" in Debug menu.
The whole project will now compile and the application will be launched.
Note: The first time you do that, for a given configuration, U++ will need to compile the whole framework, so expect anywhere up to one minute to finish. Next compilation after making changes just to the main package should be much faster.
This part only applies to Linux. Now having TheIDE running, it is a good time to install it to your desktop menu by invoking this menu item:
This creates ~/.local/share/applications/theide.desktop file, which should bring TheIDE into Programming submenu of your Linux desktop.
To start writing your own code, you should choose
MyApps assembly, which is reconfigured to place your newly created package into MyApps directory.
Now press the "New package" button and you will get into "Create new package" mini-wizard.
For this test, we will choose U++ Basic CtrlLib application which basically means GUI application without the pregenerated code for the main window class. So it just adds correct dependencies to our main package and provides really minimal boilerplate code. To finish the lecture, all we do for now is to insert:
and invoke "
Execute" just like with
Congratulations, you have just compiled your first U++ application!
The new feature of U++ 2021.1 is UppHub , system that allows easy integration of 3rd party modules (libraries) with U++ projects. This is similar to package management system like PyPI (for Python), NuGet (for C#) or vcpkg (for C/C++). Thanks to existing U++ modular system, the integration in TheIDE is really seamless.
The access to UppHub dialog is through the button in package selection dialog
or through the menu entry Setup / UppHub..
Install button clones the source repository to a location that is made visible to U++ package system which makes it instantly possible to use installed packages in your project. Check the full UppHub documentation here.
If you have followed as far as here, chances are you might be slightly interested about U++ and wonder what to do next. Well, the recommended path to get more familiar with U++ is to check and try reference examples:
These are small code snippets demonstrating most aspects of U++ framework as they are intended to be used. Just browse through the list, load what interests you and run it. Of course, there is also a website with documentation, tutorials and forums, where people are eager to solve all your problems with U++.
- 1st September, 2020: Initial version
- 15th September, 2020: Fixed formatting inconsistencies
- 8th October, 2020: Table of contents added
- 21st October, 2020: Updated with information for the 2020.2 release
- 23st May, 2021: Updated for 2021.1 release
- 27st May, 2021: Updated for 2021.2 release