[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop
Subject:    Re: Create SHARED library
From:       Thomas Regner <tomte () subdimension ! com>
Date:       1999-10-01 9:43:39
[Download RAW message or body]

On Wed, 29 Sep 1999, you wrote:
> How I can create SHARED library from files which lay in different directory?

You have to edit manually the following files:

-- configure.in   Project-Dir
-- Makefile.am   Source-Dir

You need : gnus libtool !

Step one: create a standard console app (KDevelop wizard)
Step two: include the following lines to configure.in

AM_ENABLE_SHARED
AM_PROG_LIBTOOL

Step three: include the following lines to Makefile.am after the 
	####### kdevelop will overwrite this part!!! (end)############
	line, delete all lines generated by KDevelop

INCLUDES=$(all_includes)

lib_LTLIBRARIES=lib<yourlibname>.la

<yourlibname>_la_LDFLAGS= -export-dynamic -version-info X:Y:Z $(all_libraries)

<yourlibname>_la_SOURCES=<all .h && .cpp Project-files>

# if you use qt uncomment the following line
#<yourlibname>_la_METASOURCES=USE_AUTOMOC

Step four: Switch to a shell and start libtoolize.
after an
configure; make 
or a rebuild in KDevelop the shared lib is to be found in 
<Projectdir>/<Projectname>/.libs

after some events KDevelop rebuilds the modified Makefile.am 
make tries to create an executable besides the libs, therefore returning a
linker error-->undef ref to main
just delete the KDevelop created lines and rebuild.
You have to add manualy any new Project-file to the .._la_SOURCES line
but this isn't to much work, I think.
This works well for me, but I think dist-buildiung don't work with this method,
I also never tried installation, but as a starting point this is sufficient
(grin)

hope this helps,
bye
Tom

  --  ###########################################
##  Thomas Regner  ###    Kaiserstr.5    ##
######################  26122 Oldenburg  ##
##  tomte@subdimension.com ################
###########################################

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic