Using Eclipse CDT
Install Eclipse
sudo apt-get install eclipse-cdt
or download from Eclipse website.
Install Eclipse Plugins
Help > Install New Software
Terminal (since Eclipse 4.4 Luna)
Allows you to telnet and do bash commands without opening Konsole.
- Work with: --All Available Sites--
- Search "terminal"
- Select:
- Local Terminal (Incubation)
- TCF Terminal (Console) View
- Click "Next" ... many click-through dialog boxes...
Now you can create a Terminal view by Window > Show View > Other... (Alt+Shift+Q, Q) and choose Terminal > Terminal.
To run local bash, use this setting:
To connect to OpenCog server shell:
To connect to OpenCog Scheme shell:
CMake Editor
Enter URL in Work with field
http://cmakeed.sourceforge.net/eclipse/
Name it "CMake Editor", click [Add]
Choose "CMake Editor", click [Next]
... many click-through dialog boxes...
Doesn't seem to work now, at least with Eclipse 4.4 Luna on Ubuntu 14.04 64-bit. --Hendy (talk) 14:58, 12 July 2014 (CDT)
For Fedora: you can install eclipse-cmakeed package until Fedora 20. For later versions, you can manually download and install eclipse-cmakeed-1.1.6-6.fc20.noarch.rpm manually. It works fine at least until Eclipse 4.5.1 in Fedora 22.
CMake Builder
Enter URL in Work with field
http://www.cmakebuilder.com/update
Name it "CMake Builder", click [Add]
Unselect "Group items by Category"
Choose "CMake Builder core plugin", click [Next]
... many click-through dialog boxes...
Prepare Dependencies
See Building OpenCog.
Generate new build files
(assuming source code working trees from GitHub are in a folder called cogutil, atomspace, and opencog)
Execute from outside of the source code folder:
mkdir cogutil/build
cd cogutil/build
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
make -j4
cd ../..
mkdir atomspace/build
cd atomspace/build
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
make -j4
cd ../..
mkdir opencog/build
cd opencog/build
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
make -j4
cd ../..
Import Project
File > Import > General > Existing Projects into Workspace > [Next] > {browse to opencog_build folder} > [Finish]
Leave "Copy projects into workspace" unchecked.
References:
- http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features
- http://www.eclipse.org/forums/index.php/mv/msg/373462/909018/#msg_909018
Import/Setup Code Formatter
Open preferences window: Window > Preferences Open C/C++ > Code Style > Formatter in preferences window. You can either create a new code format for opencog using New button according to development standards, or import this predefined code style using the Import button.
You can either select this style to be used by all projects, or using on OpenCog projects only by selecting this style for each project. To do this, select a project (e.g. atomspace), go to Project > Properties, open C/C++ General > Formatter, enable "Enable project specific settings" and select OpenCogStyle (or the name of the style you've created).
Build
Project > Build All
Notes
Works well with Ubuntu 12.04, Eclipse 3.7.2 and OpenJDK 6b24.
Also works with Ubuntu 14.04 64-bit, Eclipse 4.4 Luna, and Oracle Java 8. --Hendy (talk) 15:10, 12 July 2014 (CDT)
Known to have memory/GC problems with Ubuntu 12.10, Eclipse 3.8.0 and Oracle/Sun JDK 7.









