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

List:       kde-devel
Subject:    libtool question again
From:       Bo Thorsen <gobo () imada ! sdu ! dk>
Date:       1999-05-01 9:32:20
[Download RAW message or body]

I'm posting this again, this time a little more elaborate, since noone
replied to my last mail. (Strange devel list, a hundred posts about a
mascot and not a single answer to a devel question :-/ )


I have a question which probably is about libtool.

The scenario is like this: I have a java program, which uses a native
library I have written; this works fine. But my library needs to access
kde libraries, and it is not possible for me to change the java code to do
this directly.

So my question is, how can I tell libtool how to get access to the kde and
qt libs?

This is the Makefile of my cpp source dir:

<Makefile>

INCLUDES=-I../include/ -I/usr/local/java/include/ \
	-I/usr/local/java/include/genunix/ -I/usr/local/qt/include
LIBS=-L/usr/local/java/lib -L/usr/local/qt/lib -lqt
CPP=g++ -Wall -g -O

CPPSOURCES=$(shell find . -name '*.cpp' -print)
CPPOBJECTS=${CPPSOURCES:.cpp=.lo}

TARGET=libkdeawt.la
TARGETDIR=/home/bo/Programmering/AwtKde/lib

all: lib install

%.lo: %.cpp
	touch ../include/bool.h
	libtool $(CPP) -export-dynamic $(INCLUDES) $(LIBS) -c $<

lib: $(CPPOBJECTS) .libs/$(TARGET)

.libs/$(TARGET): $(CPPSOURCES)
	libtool $(CPP) -export-dynamic -o $(TARGET) $(CPPOBJECTS) $(LIBS)
-rpath $(TARGETDIR)

install: lib $(TARGETDIR)/$(TARGET)

$(TARGETDIR)/$(TARGET): lib
	libtool install -c $(TARGET) $(TARGETDIR)/$(TARGET)


clean:
	find . -name '*~' -print | xargs $(RM)
	find . -name '*.o' -print | xargs $(RM)
	find . -name '*.lo' -print | xargs $(RM)
	find . -name 'lib*' -print | xargs $(RM)
	$(RM) -rf .libs

</Makefile>

And this is the runtime error from my java test program:

/home/bo/Programmering/AwtKde/lib/libkdeawt.so: undefined symbol: __ti11QMainWindow (libkdeawt.so)
java.lang.UnsatisfiedLinkError: no kdeawt in shared library path
        at java.lang.Runtime.loadLibrary(Runtime.java)
        at java.lang.System.loadLibrary(System.java)
        at test.FrameTest.<init>(FrameTest.java)
        at test.FrameTest.main(FrameTest.java)

--

Bo Thorsen             gobo@imada.sdu.dk

Lahnsgade 31, st.      Unix systems administrator,
DK-5000 Odense C       Institute for Stat. and Dem.
Tlf: +45 66 11 83 85   University of Odense

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

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