KDevelop 3.3.x F.A.Q. (Frequently Asked Questions)

There is a newer but non-translated (English-only) wiki-based FAQ version of this page and a nutshell page in the user manual

Contents

File FAQs

Where is the Automake manager in KDevelop?

Click on the bottom tab on the right of KDevelop. Image:Automake_manager.png


How do I create New Files in a Project?

Select the sub-project in the upper half of the Automake Manager, then right-click in the lower half on the groups title you want to have the files added and select Create New File....


How do I remove a File from a Project?

Select the sub-project in the upper half of the Automake Manager, then in the lower half open the groups list you want to have the file removed from, right click on the file in this list and select Remove.


How to add existing files to a project?

The way you add existing files to a project is predicated on which build system you've chosen for your project. However, no matter what build system you are using you'll have to copy the existing sources into the src/ directory of your new KDevelop project.

Next:

  • If you've chosen the Automake Manager based project (see: FAQ#Where is the Automake manager in KDevelop?) then to add existing files to your project simply select the sub-project in the upper half of the Automake Manager, in the lower half on the groups choose the target that you want to add your files to, right click on it for the context menu, and select "Add Existing files...."
  • If you've chosen the QMake Manager based project then your task is very similar to the Automake Manager.
  • If you've chosen the Custom Makefile based project then you'll have to edit your Custom Makefile by hand to add files to your project.


Projects FAQs

How to convert my VC++ project?

KDevelop does not provide a way to automatically import your VC++ project. However, you can convert the project by creating a new KDevelop project using the New Project Wizard templates such as the C++->Simple Hello World template. Then you can copy the source files (*.cpp and *.h) from your VC++ project into the src/ directory of your new KDevelop Automake based project. Finally, follow the instructions above for adding existing files to a project.

A semi solution may be to use the dsw2make script, it takes a VC++ project file (*.dsw) with it's descendent dsp files and produces a Makefile for each one of them. Make sure it works as some mismatches may occur usually it related to the paths, case sensitivity and CR/LF. If a CR/LF problem appears use applications such as dos2unix or d2u to solve the problem. At this point you should have a regular project based on a makefiles chain. Import the project as an existing project.

How to create a truly empty project?

How to create a simple project with just a Makefile (also known as Custom Project) ?

Create a Custom Project. There is no direct way to create a custom project (i.e. a project which does use its own makefiles). Use Project->Import Existing Project instead. Remember to set the appropriate Project Type, labeled by an additional (Custom Makefiles) in the dialog. Use Project Options Early. Whenever you start a new project do not forget to set the Project->Project Options... to your needs.


How to create a simple Automake project with a directory hierarchy ?

If you want to create a project with a directory hierarchy, where each folder contains groups of cpp/h files which should built to a single executable binary file.

Ex:
  src
  src/gui
  src/gui/components
  src/logic
  src/logic/algorithms
  src/logic/sublogic


This can be accomplished using convenience libraries. Each subdirectory will be compiled and linked into a libtool-library, afterwards, all libtool-libs are linked together into one executable.

  • Step1:
    • In the AutoMake Manager, add a subproject for each subdirectory:
    • Automake Manager -> [RMB on subdir] -> Add Subproject
  • Step 2:
    • Add a Libtool target for each subproject, and populate these libraries with the .cpp files in the subdirectory:
      • Automake Manager -> [RMB on subdir] -> Add New Target
      • Primary: Libtool Library
      • Prefix: noinst
      • File name: <your name>.la
  • Step 3:
    • Add the libraries to your executable:
      • Automake Manager -> [RMB on binary] -> Options -> Libraries
  • Step 4:
    • Add library dependencies for each of the subprojects:
    • If libalgo.la depends on classes from libbase.la:
      • Automake Manager -> [RMB on libalgo] -> Options -> Libraries (check the box for libbase.la)
Ex:
 src/logic/base [libbase.la]
 src/logic/algorithm [libalgo.la]

Note: If you forgot a dependency, add the correct dependency, run clean for the subproject, and recompile the entire project (F8).


What do the "build configurations" (Project Options->Configure Options) mean?

  • debug:
    • the separate build directory is set to "debug"
    • -g3 -O0 compiler options are used to make debugging possible with no problems with optimization
  • optimized:
    • separate "optimized" build directory
    • -O2 -g0 flags to turn off debug information and turn on optimizations
  • default:
    • no special meaning, no compiler flags and build directories are set
    • binaries and libs will be located among with the source code
    • Important! Do not use "default" configuration at the same time as "debug" and "optimized". But "debug" and "optimized" can be used together with no problems because different build directories are set.


What to do if project does not build again after switching to/from default target?

There is a problem with the automake/autoconf machinery. If Project->Build Configuration provides to select from three build directories: default, optimized, and debug, by all means stick to either the default or the debug/optimized targets.

  • Once you configured your project with default it will no longer build with debug or optimized.
  • Once you configured your project with debug or optimized it will no longer build with default.


How to add subprojects?

Select the automake-manager. In the upper half, you see the projects. To add a subproject, select the project to which you want to add a subproject and click on the icon "add subproject". A new folder is created with the name of the subproject (in the filesystem and the automake-manager).

You should now create a libtool-target for the new subproject. If you have done this, make this target active and add files to it.

The libtool-target in the subproject can be linked to your main binary-target by right-clicking it and select "settings". Under the tab "libraries" you select the appropriate help-library (.la file).

What to do when automake & friends fails with strange error messages?

Open a console window in your project root directory and type:

libtoolize --copy --force

It should solve the problem of conflicting autotools versions between KDevelop and your installed system.


I get "Wrong autoconf version" etc. Error. What can I do?

There are several error messages concerning too old versions of autoconf etc. preventing configure from working properly. Run autoreconf in the directory tree where the configure.in files in question are. This command will try to update the information in the GNU Build System files. See man autoreconf for more information. If you get:

*** YOU'RE USING autoconf (GNU Autoconf) 2.60.
*** KDE requires autoconf 2.53 or newer

then you need to replace the admin dir of your project with the one from KDE 3.5. You can do that by following these steps (assuming /home/user/projects/myproject as path for the project):

  • cd to a temporary folder
  • svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin admin
  • rm -rf admin/.svn
  • rm -rf /home/user/projects/myproject/admin
  • mv admin /home/user/projects/myproject/


How can I develop with Qt4 and KDevelop-3.4.x?

  • Go to the Project Options (in the Project menu) and select the C++ Support. Open the Qt tab and make sure the Qt4 checkbox is checked. Then choose the Qt4 qmake binary for example:
      /usr/bin/qmake-qt4 (on a Debian Unstable System)
  • Also make sure to choose the right designer for Qt4, for example:
      /usr/bin/designer-qt4 (on a Debian Unstable System)
  • If you use qmake, you can choose the needed Qt libraries for your project via the qmake manager. Open it and right-click on a subdirectory or the root directory and choose Options from the context menu. On the Configuration page you'll see the various Qt4 libraries and you can choose any you like

How can I develop with Qt4 and KDevelop-3.3.x?

  • If you are using qmake, kdevelop runs qmake from the PATH, so the qmake from Qt4 must be first in the PATH (http://bugs.kde.org/show_bug.cgi?id=119107). For this, don't launch kdevelop as usual, but use the following shellscript instead:
#!/bin/sh
export QTDIR=/devel/kde/src/4/qt-copy
export PATH=$QTDIR/bin:$PATH
exec kdevelop $*
  • The second issue is that the embedded Qt designer is the Qt3 one. Instead we want to launch the Qt4 designer for .ui files. Two steps are needed for this:

Open ~/.kde/share/config/kdeveloprc, find the [General Options] group (not [General]!), and add the line:

Embed KDevDesigner=false

Create ~/.kde/share/applnk/.hidden/designer.desktop with the following contents (adjust the path to Qt4)

[Desktop Entry]
Type=Application
Exec=/devel/kde/src/4/qt-copy/bin/designer
Name=Qt Designer
GenericName=Interface Designer
MimeType=application/x-designer
Icon=designer

The full path to designer is needed there, even though the PATH is correct in KDevelop. This is because KDevelop doesn't really start designer directly, it asks kdeinit to do so...


  • Use "Hello World" when creating a new project, not "Application", or your first Qt4 project will be a Qt3->Qt4 porting project :)

How can I set up a project with SCons?

SCons is a software construction tool. KDevelop (as of version 3.4.0) does not support SCons projects directly. However, it is possible to set up a project very simply using SCons by writing a "stub" Makefile and using the "Custom Makefiles" project type. An example of a simple stub Makefile is the following (note that lines after target names should be indented with tabs, not spaces):

project_name:
        scons
clean:
        scons --clean

This will enable the Build Project and Clean Project actions to work.

Libraries FAQ

What are the differences between .a, .so and .la libraries ?

There is a nice introduction to program libraries using the GNU toolset and there is an introduction to Libtool. Basically:

  • .a (Static libraries) are simply a collection of ordinary object files.
  • .so (Shared Object) are libraries that are loaded by programs when they start, you should read the link above before using this type.
  • .la (Libtool Archive) this is the most flexible one, but you should read the using libtool manual first.


How to create a .so library?

  • Add a target to the project
    • primary: program
    • prefix: bin
    • file name: libxxx
    • Linker Flags->Other: -shared -Wl,-soname,libxxx.so.1 -o libxxx.so.1.0.1
    However, on some systems it results in the following error message during project compilation:
    -soname command not recognized.
    If that happens use only -shared -o libxxx.so

There is also a libtool based method:

  • Add a sub-project "libxxx"
  • Add a target
  • Choice "Library (libtool)"
  • Choice "lib"
  • Put your library name "xxx"
  • Add your files
  • Build the project (Use 'Build project' or F8).

Now, you should have a new library named libxxx.so.0.0.0


How to create a .a library?


How to create a .la library (a.k.a. a libtool archive)?


How to add an external include path to a project?

When your project is GNU Autotools (Autoconf/Automake) based then you are most probably using the KDevelop Automake manager (see FAQ#Where is the Automake manager in KDevelop?). To add an include path to your project do:

  • select the subproject you want to add the path to on the top view of the AutoMake manager.
  • select Options... with the RMB or hit the wrench icon
  • on the Includes tab add your path to the second box (Directories outside of project). Just enter the directory path after the -I (without whitespaces between).


How to link against a .so library?

When your project is GNU Autotools (Autoconf/Automake) based then you are most probably using the KDevelop Automake manager (see FAQ#Where is the Automake manager in KDevelop?). To link your program against a library, or to add a library do :

  • select the subproject you want to add the library to on the top view of the AutoMake manager.
  • select Options... with the RMB or hit the wrench icon
  • on the libraries ("compiler") tab add libs in the second box (link libraries outside of project). Just enter the lib name, without the lib prefix and the .a or .so or .la or what ever ending.
    • i.e if your lib is libsomelib.so, then you add it so: -lsomelib
  • If that library is not part of your system wide library path add -Lpath/to/the/library/you/used to the LDFLAGS in your Project->Project Options...->Configure Options->Linker Flags(LDFLAGS):.

Do not forget to add the the location of the library's .h files to the include path of your executable like it's explained in FAQ#How to add an external include path to a project?


How to link against a .a library?

This is similar to FAQ#How to link against a .so library?


How to link against a .la library?

This is similar to FAQ#How to link against a .so library?

Addition: There's another, more convenient, way to link mybinary against somestuff.la. Let libsomestuff.la reside in $(somedir), then, instead of adding -lsomestuff -L$(somedir), just add $(somedir)/libsomestuff.la. The libtool utility can handle this.

The full process (adapted from above):

  • select the subproject you want to add the library to on the top view of the AutoMake manager.
  • select Options... with the RMB or hit the wrench icon
  • on the libraries tab, remove the -l and add $(somedir)/libsomestuff.la in the second box (link libraries outside of project).

This is the same process/behaviour as if linking against convenience libraries within the same project, there, one just has to check the appropriate libraries in the top box (Link convenience libraries inside project).

The messy details: The library entries are added to mybinary_LDADD in the appropriate Makefile.am. The LDADD variable can handle libtool archives natively, i.e. it reads the locations of the actual libraries and add them accordingly.


How to link with libraries where the source within those libraries heavily depend on each other?

When you have simple dependencies, just add all libraries and reorder them with the move up and move down options. But when the libraries have cyclic and recursive on each other you need to use a different approach: In Target Options for "appName"->LDFLAGS->Other specify all cyclic and recursive static libs :

$(all_libraries) --start-group fullPathLib1.a fullPathLib2.a fullPathlibn.a --end-group

Then on Target Options for "appName"->Libraries->Link libraries outside project (LDADD) add the full path to the created library:

/fullPathToMyConcatenedLib.so

Debug FAQs

Debugging a console application : How do I get the console to show so I can enter data?

In the Project Options dialog, go to the Debugger tab and check Enable separate terminal for application IO


How to debug exec objects with libtool "temporary wrapper scripts"?

When building ltlibraries and linking exec with them, libtool creates wrappers about them, but gdb complains not in executable format: File format not recognized

To make it work do:
Project -> Project Options -> Debugger -> Debugging shell -> libtool --mode=execute 


Why does the debugger ignore/does not stop at breakpoints?

Autotools projects - Make sure you are using the debug configuration (see: FAQ#What to do if project does not build again after switching to/from default target?) or that you are compiling with "-g3 -O0" options.

QMake projects - You need to manually add CONFIG += debug to your *.pro files, and restart KDevelop.

Why does the debugger issue the error "no debug information or source" ?

Make sure you are using the debug configuration (see: FAQ#What to do if project does not build again after switching to/from default target?) or that you are compiling with "-g3 -O0" options.


How to do remote or cross debugging ?

See FAQ#How to set up a different compiler (native or cross compilers).

Code Completion FAQs

How can I enable code completion?

When you have any C/C++ project opened, go to menu Project->Project Options, in Project Options dialog choose C++ Specific tab, then Code Completion tab. Check the Automatic Code Completion check box and other assorted settings. Also in the Settings->Configure KDevelop->C++ Parsing dialog you can enable and vary the background parsing loop.


How to teach new macros to the C/C++ parser?

KDevelop's current parser does not parse files in order. If you need to teach new macros to the C/C++ parser, the best way to do this is to parse a fake file that contains only macro definitions before parsing the source files. This is what the C++ Parser Settings dialog is for. The contents of this fake source file is the text you edit in the C++ Parser Settings dialog, which will be parsed first anytime that you load a project.


How can I enable code completion for external libraries?

When you have any C/C++ project opened, go to menu Project->Project Settings, in Project Options dialog choose C++ Specific tab, then Code Completion tab. Push Add Persistent Class Store button and complete the New Persistent Class Store wizard. After completing the wizard, make sure that the newly created class store is checked in the list of persistent class stores at Code Completion tab.


Code completion still doesn't work

Try disabling the abbreviation part - it often presents a completion popup before the completion engine gets a chance to do so.

Try running the Add Persistent Class Store Wizard on your projects directory.

Why doesn't my Qt4 Persistent Class Store work for all Qt4 classes?

If you are using KDevelop 3.3.x or below the persistent class store won't work correctly when importing Qt4's include directories. Qt4's includes are mostly one-liners with '#include "../../src/blah.h", which KDevelop can't handle. To work around this, try using Qt4's src directory when creating the completion database.


KDevelop installation FAQs

How long does it usually take to compile kdevelop?

This depends on the speed of your machine. A developer has a P4 that runs at 3GHZ and it takes 40 minutes to compile KDevelop the first time. After updating from CVS, it usually takes less time. We would guess the average build time is between 1 and 2 hours after the initial download.

It's a good idea to use gcc-4.0.1. This will drastically reduce the compilation time. Debug compilations ("./configure --enable-debug=full" with -g -O0 flags) are sped up by 45% and release ("./configure --enable-debug=no" with -O2 flag) - by 16%. For example, on AthlonXP1600 / 256Mb RAM system fresh debug compilation takes 45 mins with gcc-4 and 81 mins with gcc-3.3.1. To speed up things even more, the most recent libtool (from CVS HEAD) can also be used.

It is usually safe to have gcc-4 installed in /usr/local among with gcc-3.x in /usr. It is also possible to compile only KDevelop with gcc-4 and leave the rest (Qt, KDE, etc.) without recompilation.

Note! Do not use gcc-4.0.0 because it miscompiles the code. gcc-4.0.1 and later versions are not vulnerable to this problem.


I get an error message "couldn't create a language plugin". What is wrong?

Just as any other KDE application, you have to make sure that KDevelop's plugins are recognized by KDE. Either install it into your KDE directory (configure --prefix=/opt/kde3 for example) or add KDevelop path to your KDEDIRS environment variable and rerun "kbuildsycoca". Example command line for bash (assuming KDevelop is installed in /home/harry/kdevelop):

export KDEDIRS=/home/harry/kdevelop:$KDEDIRS && kbuildsycoca


If the error is specifically "Could not create language plugin for C++.", try also making sure you have a valid bdb (Berkeley DB) installation.

You should see something like this:

ldd ~/devel/install/lib/libkdevcatalog.so | grep libdb
        libdb-4.3.so => /usr/lib64/libdb-4.3.so (0x00002ba8687c9000)

If you see something like this:

ldd ~/devel/install/lib/libkdevcatalog.so | grep libdb
       libdb-4.3.so => not found

then your distro's package management hasn't managed to track the bdb dependency correctly and you need to install a compatible bdb version.

I get an "error: qassistantclient.h: No such file or directory". What is wrong?

Your distribution (i.e SUSE, Mandriva, Fedora, Ubuntu) has split Qt 3 into several different packages. You will need to locate and install the development packages for the Qt 3 applications. Since the the names of these packages is distribution dependent, the KDevelop team can't provide an exact name of the package to install. Several possibilities exist, including:

  • qt3-apps-dev (Ubuntu)
  • qt3-devel-doc (SuSE 9.x)
  • qt3-devel (openSUSE 10.x)
  • qt3-doc-devel
  • libqt3-devel (Mandriva)
  • qt-debuginfo (Fedora)

If your distribution uses a package name not on this list, please add it here for others to reference.


I get an "error: possibly undefined macro: AM_PROG_LIBTOOL". What is wrong?

If you get something like this when trying to build/compile one of KDevelop's template applications:

configure.in: warning: macro `AM_PROG_LIBTOOL' not found in library
configure.in: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.

Then it means that you did not read the KDevelop requirements page properly. Please install libtool

Version Control Systems

What files should I check in my VCS?

  • Source files
  • The KDevelop project file .kdevelop but make sure that it does not contain any absolute paths in it. Edit the file in a text editor if necessary.
  • The doxygen configuration file Doxyfile
  • The minimum set of files from the used build system. Only a minimum set of files should be checked in, files automatically generated by the build system should not be checked in. The build system can be Autotools, QMake, custom Makefiles, CMake, Scons, Ant ... etc, so it's hard to tell you exactly what files each build system uses.

Do not check in .pcs and .kdevses files

Working with Clearcase views and KDE

Clearcase files are typically stored under '/usr/vobs/...' and binary objects may contain references to this path. If your kdevelop project was defined using a different path (e.g. '/view/[view name]/usr/vobs'), you may experience problems with files being opened twice, confusing breakpoint behaviour and misleading file editing.

If kdevelop is started from a shell inside a clearcase view, it still will be unable to see '/usr/vobs/...' unless KDE was itself started in a clearcase view. The following approach solves these problems:

cp /etc/X11/xinit/xinitrc ~/.xinitrc
change the penultimate line from
exec $WINDOWMANAGER
to
/opt/rational/clearcase/rhat_x86/bin/cleartool setview -exec $WINDOWMANAGER ViewName

where ViewName is the name of the view you wish to use.

Unfortunately this does seem to cause problems with non-KDE applications (eg. firefox) and has locked up my machine. The other alternative is to use another window manager such as Gnome.

How to use the SVN plugin?

NOTE TO svn+ssh:// repository users.

If you try to initiate svn operation but fails with error message "connect closed unexpectedly", the problem is in authentication. Unlike other protocols such as svn:// , http:// or https:// , the authentication for svn+ssh:// is managed by ssh system. Subversion does not have any control over authentication.

When you started kdevelop with terminal, SSH will ask you a password through terminal. So you should enter the password into terminal.

But when you started kdevelop via menus (i.e., you didn't associate any terminal), you should install a small X11 program called "ssh-askpass" and set SSH_ASKPASS environment variable to that executable. After that when you try svn operation, ssh-askpass will ask you a password. That's it.

See manpages for ssh-agent.

GENERAL USAGE:

You need to manually checkout the project and source files from a subversion repository. Or you can import new project into repository at the time of project creation by project wizard.

After opening the project, go "Project" menu -> "Project Options" -> "Version control" tab. Select subversion combobox. Save the settings and reopen the project. Then the subversion context menu should appear when you right-click on files. Also each file/dir in FileTree view should be colored differently according to their status.

Code indentation

Does KDevelop provide on-line (as you type) code indentation aka smart indentation, aka auto indentation, aka on-the-fly indentation?

It does, KDevelop uses KatePart as it's text (code) editor and KatePart provides this functionality. It can be configured via Settings -> configure editor -> Indentation. KatePart is developed by the Kate development team, if you find bugs or have suggestions please contact them directly via their website http://kate-editor.org/

I do not like the on-line code indentation, does KDevelop provide other, more configurable, indenter?

Yes, KDevelop has an off-line code formater that you invoke via Edit->Reformat source. It can be configured using Project -> Project Options -> Formatting. It works by invoking an external tool called astyle. If you find bugs or have suggestions please contact the developers of that tool directly via their website http://astyle.sourceforge.net/


Legal FAQs

Am I allowed to develop proprietary (closed source, non-free) applications with KDevelop?

Everyone and all entities are free to use KDevelop. The generated code can be put under all licenses you wish. Therefore, the project generator has the fields for adding your own copyright notice to the generated files, but to make things simpler and to have an example, the default is a GPL license notice. So you can add your license notice there. When it comes to actually editing etc. your program, using KDevelop is just as using any other editor, it's a program that is GPL that is intended for use and doesn't have any implications on what you use it for. So you can write proprietary software with it despite the fact that KDevelop itself is GPL. Towards using KDE functions or any other stuff of free software, you only have to watch the licensing notes on the libraries you're going to use. So for development of proprietary KDE/Qt applications you only need a professional license from Trolltech. The KDE libraries itself are LGPL which means you can use the function calls and link your program to the KDE libraries. This counts for the kdelibs libraries, the kdebase libraries (konqueror and kcontrol etc.) and the koffice libraries (for creating koffice applications). For more information, please visit KDevelop Licensing

Am I allowed to develop proprietary plugins for KDevelop?

KDevelop includes a libkdeveloplgpl.so library to allow development of proprietary plugins. This library includes KDevelop interfaces and utility functions released under LGPL. If you have a professional license from Trolltech you can link your code with libkdeveloplgpl and release it under any license.

Note that this situation is analogous to the binary-only drivers situation in the Linux kernel, so you can expect the FSF not to approve this model.

Misc. FAQs

I am developing an application which needs exception handling. How can I make it?

Edit the file configure.in(.in) in your toplevel source directory. Here, you have to enter after the AC_CHECK_COMPILERS() macro:

CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"

and after that you have to recreate your new "configure" by invoking

make -f Makefile.dist

at the toplevel source directory and then restart the configure script.


My configure.in.in hasn't any AC_CHECK_COMPILERS() call. Where should I put the CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" mentioned above?

The new versions of configure.in.in has been simplified you can now add the line after the AM_INIT_AUTOMAKE(<package-name>,<version>).


Is there any HOWTO available on how to work with QT designer made dialogs ?

Yes, there is a great tutorial on http://women.kde.org/articles/tutorials/kdevelop3/index.html


Why don't I see the compilation error messages?

If during compilations you notice some valuable information is missing in the Messages Output View window, it may be that the level of message detail is set too low. Right-click in the window and select another detail level from the context menu.


How to add a translation to a KDE program?

First execute Build->Create Messages&Merge and after that add a new translation via Project->Add Translation. This creates a po/$lang.po file. The $project.pot file has all the strings in it.


How to add icons to a project?

First add a new subproject via the automake manager called pics. Then right-click the new subproject, choose Settings and then Prefix. Add a new prefix with for example mypics as name and the path $(kde_datadir)/$project/pics. After that create a new target in the pics subproject and choose Data as Primary, mypics as Prefix and add a dummy name. At last add your Icons to the new target. Loading the image can be performed by including the kiconloader.h header file and the following code which adds a pixmap with the name config to a button: button->setPixmap(UserIcon("config"))


How to set up a different compiler (native or cross compilers)

Compilers are set for a project:

  • Project->Project Options->Configure Options (autotools based projects only, custom projects do not have such a tab)
  • add a new configure name, e.g. <compilername>-<platform>-debug

Tab "General":

  • set configure arguments (e. g. --host and --build options if cross compiling)
  • set the build directory, to avoid confusions use the same name as the configuration
  • set any flags if appropiate (LDFLAGS, ENV)

Tab "C":

  • set the name of your C-compiler binary, e.g. CC, gcc, icc, kcc, ... (cross-compilers also!)
  • set any flags as appropriate (CFLAGS)

Tab "C++":

  • set the name of your C++-compiler binary, e.g. cc, g++, ... (cross-compilers also!)
  • set any flags as appropriate (CXXFLAGS)

Tab "Fortran":

  • set the name of your Fortran-compiler binary, e.g. g77, g90, gfortran, ... (cross-compilers also!)
  • set any flags as appropriate (FFLAGS)

Close the options, select your configuration in Project->Build Configuration, then run Automake & Friends, configure and make.

For example, to set up sparc-sun-solaris2.9 target cross-compiler do:

  • Project -> Project Options -> Configure Options
  • Add a new config name, e.g. "sparc-debug""
  • Configure Arguments:
--host=i686-pc-linux-gnu -- build=sparc-sun-solaris2.9
  • Build Directory:
sparc-debug
  • change to Tab C, insert name of cross gcc, e.g. sun-solaris-sparc2.9-gcc
  • change to Tab C++, insert name of cross g++, e.g. sun-solaris-sparc2.9-g++
  • Automake & Friens
  • configure
  • make

For cross debugging see Remote debugging using KDevelop 3.0 in comp.os.linux.embedded newsgroup or Cross_debugging. The kdevelop.org forum also contains some info about it.

Make sure that the binaries and libraries of the (cross-)compiler are available in $PATH and $LD_LIBRARY_PATH!

It might be necessary to change some autoconf/automake macros in configure.in to fully support your compiler -- see the last message in this thread kdevelop.org forum what to do to get gfortran (GNU F90 compiler) working.

Esta página ha sido actualizada por última vez el: dom 18 may 2008 16:40:14 CEST

Tradución española mantenida por Miguel Ángel De Blas Búrdalo

Si hay algún problema con el sitio web, por favor contacte con el webmaster.
Inglés Arabico Checo Alemán Español Francés Hungaro Indonesio Italiano Holandés Polaco Portugués Brasileño Portugués Rumano Ruso Turco Ucraniano Chino Simplificado
Powered by Google
www www.kdevelop.org