Create Library-Project (C-language)
Manfred Rebentisch
mrebentisch at comparat.de
Wed Dec 22 10:50:10 GMT 2004
Hello,
I use the KDevelop 3.1.0 (want update next days to 3.1.2) and does not
understand, how to create a project for a C-library.
I searched the documentation, searched the forum (phorum5) and find something:
Tilo, 2004-09-02:
"I solved the dynamic lib problem using a programm target with noinst option
and -shared flag set. the cpp files need to be compiled with -fPIC option -
that's all ... now i get nice *.so libs which i can load with dlopen into my
app!!!"
But what means "using a programm target with noinst option" ? How can I do it?
Since today I create libraries with own Makefiles. With KDevelop I just start
working after two years pause.
From my own Makefile (shortly the important parts, so you can understand, what
I want to do):
TARGET=libstd3000c
CPINCLUDE=/usr/include/comparat
LIBS=-L./
CFLAGS=-I . -DNDEBUG -O -pedantic -Wall -Wno-long-long -fPIC -DPIC
objects = cparray.o cpmutex.o cpmap.o
$(objects): %.o: %.c
gcc -c $(CFLAGS) $< -o $@
libstd3000c.so.2.0.0: $(objects)
gcc -shared -Wl,-soname,libstd3000c.so.2 -o libstd3000c.so.2.0.0 $(objects)
-lc
Thank you for help in advance
Manfred
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list