Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Creating Libraries

From KDevelop

How to build libraries in KDevelop:

I've tried this in KDevelop 3.1.2, and the following steps work for me:

1. Creating an application project
Use the project wizard (Project->New Project) to create a project, choosing the type to match the kind of library you want to make as close as possible

2. Adding a target
Open the Automake Manager (by default on the right side). In the top pane, click the "Add target" button. Choose 'Library' as target type for a .a library and adjust the settings to your liking. When clicking OK, the target will show up in the bottom pane.

3. Adding files
In the bottom pane, right click on the library target. Add new or existing files as desired.

4. Activating
In the bottom pane, right click on the library target. Select "Make Target Active".



After this, automake & friends should run on first build as usual, and you should be able to build your library. You can add other targets to the same project - for example a program target that includes an application entry point for unit testing of your lib.


To build a dynamic library inside an existing project with a CORRECT soname (with the .so extension name) in KDevelop 3.1.2, you need to change the ltmain.sh script.

Apparently, the ltmain.sh 1.5a along with KDevelop produces bad soname's (without .so). Be sure libtool >= 1.5.6 is installed. Then, copy /usr/share/libtool/ltmain.sh into your main project's directory. So you could now add a library sub-project.

  1. Add a sub-project "libfoo"
  2. Add a target
  3. Choice "Library (libtool)"
  4. Choice "lib"
  5. Put your library name "foo.so"
  6. Add your files
  7. Configure and build it.

Now, you should have a new library named libfoo.so.0.0.0 :-)

Retrieved from "http://www.kdevelop.org/mediawiki/index.php/Creating_Libraries"

This page has been accessed 9,054 times. This page was last modified 12:30, 20 August 2007. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Help
Donations

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports