-
Notifications
You must be signed in to change notification settings - Fork 0
/
Eclipse.html
214 lines (171 loc) · 9.7 KB
/
Eclipse.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Eclipse on Ubuntu</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css?v=fadd4351" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=77160d70" />
<script src="_static/documentation_options.js?v=a8da1a53"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Windows Subsystem for Linux (WSL2)" href="WindowsSubsystemForLinux.html" />
<link rel="prev" title="VSCode" href="VSCode.html" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59110517-1', 'auto');
ga('send', 'pageview');
</script>
</head><body>
<div id="navbar" class="navbar navbar-default ">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.mantidproject.org">
</a>
<span class="navbar-text navbar-version pull-left"><b>main</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
<li><a href="index.html">Home</a></li>
<li><a href="https://download.mantidproject.org">Download</a></li>
<li><a href="https://docs.mantidproject.org">User Documentation</a></li>
<li><a href="http://www.mantidproject.org/contact">Contact Us</a></li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<p>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="nav-item nav-item-0"><a href="index.html">Documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">Eclipse on Ubuntu</a></li>
</ul>
</div> </p>
</div>
<div class="container">
<div class="row">
<div class="body col-md-12 content" role="main">
<section id="eclipse-on-ubuntu">
<span id="eclipse"></span><h1>Eclipse on Ubuntu<a class="headerlink" href="#eclipse-on-ubuntu" title="Link to this heading">¶</a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#prerequisites" id="id1">Prerequisites</a></p></li>
<li><p><a class="reference internal" href="#installing-eclipse" id="id2">Installing Eclipse</a></p></li>
<li><p><a class="reference internal" href="#building-with-cmake" id="id3">Building with CMake</a></p></li>
<li><p><a class="reference internal" href="#suggested-plugins" id="id4">Suggested Plugins</a></p></li>
</ul>
</nav>
<section id="prerequisites">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading">¶</a></h2>
<p>1.
Follow the getting started guide and building with cmake, but stop before actually using cmake to build the project.</p>
<p>2.
Install the JRE by running sudo apt-get install default-jre</p>
</section>
<section id="installing-eclipse">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Installing Eclipse</a><a class="headerlink" href="#installing-eclipse" title="Link to this heading">¶</a></h2>
<p>1.
Install Ubuntu-Make</p>
<p>run the following in terminal</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>add-apt-repository<span class="w"> </span>ppa:ubuntu-desktop/ubuntu-make
sudo<span class="w"> </span>apt<span class="w"> </span>update
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>ubuntu-make
</pre></div>
</div>
<p>This will add the umake repository to the list of repositories then install umake</p>
<p>2.
Install eclipse using Umake</p>
<p>run the following in terminal</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>umake<span class="w"> </span>ide<span class="w"> </span>eclipse-cpp
</pre></div>
</div>
<p>leave the installation path to the default</p>
<p>3.
add eclipse to the path so it can be run from command line</p>
<p>run the following in terminal</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>gedit<span class="w"> </span>.bashrc
</pre></div>
</div>
<p>then scroll to the bottom of the file and add</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/path/to/eclipse-cpp-folder/
</pre></div>
</div>
<p>then save and exit gedit, and restart terminal.</p>
<p>type eclipse into command line, it should open.</p>
<p>4.
Install gdb by running</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>gdb
</pre></div>
</div>
</section>
<section id="building-with-cmake">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Building with CMake</a><a class="headerlink" href="#building-with-cmake" title="Link to this heading">¶</a></h2>
<p>1.
from the pre-requisites section, you should already have installed/setup everything to the point where you are ready to run CMake, create two
folders, one for debugging in eclipse “eclipseDebug” and one for quick test runs EclipseTest</p>
<p>Enter eclipseDebug and run</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>cmake<span class="w"> </span>-G<span class="s2">"Eclipse CDT4 - Ninja"</span><span class="w"> </span>-DCMAKE_BUILD_TYPE<span class="o">=</span>Debug<span class="w"> </span>-DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT<span class="o">=</span>TRUE<span class="w"> </span>-DCXXTEST_ADD_PERFORMANCE<span class="o">=</span>TRUE<span class="w"> </span>-DENABLE_WORKBENCH<span class="o">=</span>TRUE<span class="w"> </span>/path/to/mantidrepository
</pre></div>
</div>
<p>then enter eclipseTest and run</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>cmake<span class="w"> </span>-G<span class="s2">"Ninja"</span><span class="w"> </span>-DCMAKE_BUILD_TYPE<span class="o">=</span>Release<span class="w"> </span>-DCXXTEST_ADD_PERFORMANCE<span class="o">=</span>TRUE<span class="w"> </span>-DENABLE_WORKBENCH<span class="o">=</span>TRUE<span class="w"> </span>/path/to/mantidrepository
</pre></div>
</div>
<p>2.
open eclipse, leaving your workspace as it is, then go to <code class="docutils literal notranslate"><span class="pre">File>Import>General>Existing</span> <span class="pre">Projects</span> <span class="pre">into</span> <span class="pre">Workspace</span></code> and then click next
click browse and find eclipseDebug folder and then add it to eclipse</p>
<p>3.
select <code class="docutils literal notranslate"><span class="pre">Project>Build</span> <span class="pre">All</span></code></p>
<p>4.
navigate to Run>Run Configurations>C/C++ Application then create a new launch configuration. on the Main tab ensure the correct project is selected then under C/C++ Application
click browse and navigate to /bin/MantidWorkbench</p>
</section>
<section id="suggested-plugins">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Suggested Plugins</a><a class="headerlink" href="#suggested-plugins" title="Link to this heading">¶</a></h2>
<p>To install these plugins, run eclipse, Select Help>Eclipse Marketplace and install them from there.</p>
<p>Eclox: Eclipse plugin for Doxygen.</p>
<p>cppStyle: ClangFormat tool as a code formatter.</p>
</section>
</section>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<ul class="nav navbar-nav" style=" float: right;">
<li>
<a href="VSCode.html" title="Previous Chapter: VSCode"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« VSCode</span>
</a>
</li>
<li>
<a href="WindowsSubsystemForLinux.html" title="Next Chapter: Windows Subsystem for Linux (WSL2)"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Windows Subsy... »</span>
</a>
</li>
<li><a href="#">Back to top</a></li>
</ul>
<p>
</p>
</div>
</footer>
</body>
</html>