|
|
|||
![]() |
Department of Engineering |
| University of Cambridge > Engineering Department > computing help |
geany
is an IDE (Integrated Development Environment) for C++ (and some other languages). It has an editor and some support for multi-file source code.
It uses g++ to compile the code and make to deal with
the compilation of multi-file source code. You can start it by typing its name (followed, optionally, by a C++ filename), by
clicking on its icon (it's in the Development section of the Application Browser), or by
dragging a C++ source file
onto its icon.
If you drag multiple source files onto the icon (or the opened geany window), the files will be opened in geany's editor, and you may even by able to use the Make all option to create a new executable program, but the Execute button won't work. For CUED's 1ATrading exercise you can fix this by loading the project file in (it's best to start by doing this rather than loading in the individual files). Use the project file that's in the folder where your source files are (it has a .geany suffix).

Behind the scenes, geany uses project files (with a .geany suffix) to specify which files belong to a project, what should happen when the Execute button is pressed, etc. When it executes a file it creates a temporary script called geany_run_script.sh. Here's a typical project file for the 1ATrading project
[project] name=1ATrading base_path=/homes/users/g/tpl/1ATrading/ make_in_base_path=false description= run_cmd=./Trading [files] current_page=2 FILE_NAME_0=0;1;0;16;1;1;0;/homes/users/g/tpl/1ATrading/OurTradingFunctions1.cc; FILE_NAME_1=0;1;0;16;1;1;0;/homes/users/g/tpl/1ATrading/OurTradingFunctions2.cc; FILE_NAME_2=0;1;0;16;1;1;0;/homes/users/g/tpl/1ATrading/OurTradingMain.cc; FILE_NAME_3=0;1;0;16;1;1;0;/homes/users/g/tpl/1ATrading/OurTradingHeader.h;
When you re-start geany it loads in the previous project file it used. You can load new project files or re-load old ones using Open option in the Project menu.
geany sometimes forgets what the Execute button should do. The solution is to load the project file in again.
| | 1AComputing | C++ | computing help | |