Difference between revisions of "Using kdevelop4"

From Yade

(added description of too long line problem and link to solution)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
   
 
Importing the sources of Yade in a kdevelop project is straighforward. It is recommended to type the cmake command once before that. Then the steps are as follows:
 
Importing the sources of Yade in a kdevelop project is straighforward. It is recommended to type the cmake command once before that. Then the steps are as follows:
  +
 
1. Project -> Open/Import project
 
1. Project -> Open/Import project
  +
 
2. Select the trunk directory
 
2. Select the trunk directory
  +
 
3. Keep "Cmake Project Manager" as the build system (default)
 
3. Keep "Cmake Project Manager" as the build system (default)
  +
 
4. Click "Finish"
 
4. Click "Finish"
  +
 
5. In order to build from inside kdevelop, set the build directory (where the cmake command has been executed) in project options (e.g. right-click the project in the LHS "Project" tab, and select "open configuration").
 
5. In order to build from inside kdevelop, set the build directory (where the cmake command has been executed) in project options (e.g. right-click the project in the LHS "Project" tab, and select "open configuration").
  +
 
6. Options like "-jN" can be also defined in the build configuration
 
6. Options like "-jN" can be also defined in the build configuration
   
Line 16: Line 22:
   
 
[[Image:kdev4_2.png|800px|Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warnings FIXMEs, TODOs,...]]
 
[[Image:kdev4_2.png|800px|Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warnings FIXMEs, TODOs,...]]
  +
  +
There is a known problem with KDevelop (originally kate text editor which is used in KDevelop by default) concerning '''too long lines'''. If a line has more than 1024 characters a warning usually a is raised and the file is set on read-only. In fact it is no good programming using such long lines but it has been observed that even long lines that are wrapped cause problems. For that reason follow you can disable the character checking and remove the read-only attribute that KDevelop set. [http://olezfdtd.wordpress.com/2012/04/05/open-files-with-long-lines-in-kwrite-kate-and-kile/ see here]

Latest revision as of 12:42, 23 July 2014

Passing the pointer on members will display informations and links to navigate in the sources.

Importing the sources of Yade in a kdevelop project is straighforward. It is recommended to type the cmake command once before that. Then the steps are as follows:

1. Project -> Open/Import project

2. Select the trunk directory

3. Keep "Cmake Project Manager" as the build system (default)

4. Click "Finish"

5. In order to build from inside kdevelop, set the build directory (where the cmake command has been executed) in project options (e.g. right-click the project in the LHS "Project" tab, and select "open configuration").

6. Options like "-jN" can be also defined in the build configuration

Yade can be compiled and debbuged from inside kdevelop. It gives nice error output with links to where the errors are, etc. There is also a rich class and member description, auto-completion, display of functions signatures,... as shown in screenshots.

Also check page on debugging.

WARNING: Kdevelop embedded editor is removing trailing spaces by default when it opens a file. While this is generally usefull, it is not desirable if you plan to commit your work (it would clutter commits with a lot of empty lines attributed to you). This option has to be turned off in two different places : editor->configure->editing->general->remove trailing spaces AND editor->configure->open/save->general->remove trailing spaces.

Compiling from kdevelop will display links to where the errors are, as well as different formated listings of warnings FIXMEs, TODOs,...

There is a known problem with KDevelop (originally kate text editor which is used in KDevelop by default) concerning too long lines. If a line has more than 1024 characters a warning usually a is raised and the file is set on read-only. In fact it is no good programming using such long lines but it has been observed that even long lines that are wrapped cause problems. For that reason follow you can disable the character checking and remove the read-only attribute that KDevelop set. see here