[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Using klibloader
From: Philippe Fremy <pfremy () chez ! com>
Date: 2001-07-15 19:04:41
[Download RAW message or body]
Hi, I am trying to load a kpart "by hand" but this is not as simple as I
expect it to be.
Here is my code:
KLibFactory * factory;
factory = KLibLoader::self()->factory( "libkipaddr.la" );
ASSERT(factory);
factory = KLibLoader::self()->factory( "libkipaddr" );
ASSERT(factory);
factory = KLibLoader::self()->factory( "kipaddr" );
ASSERT(factory);
factory = KLibLoader::self()->factory( "libkipaddr.so" );
ASSERT(factory);
I didn't know which library filename I should give so I made these attempts.
Here is what I get on the output of my program:
kdecore (KLibLoader): WARNING: library=libkipaddr.la:
file=/usr/home/philippe/bonobo-controls/kipaddr/kipaddr/.libs/libkipaddr.la:
ASSERT: "factory" in main.cpp (20)
kdecore (KLibLoader): WARNING: library=libkipaddr:
file=/usr/home/philippe/bonobo-controls/kipaddr/kipaddr/.libs/libkipaddr.la:
ASSERT: "factory" in main.cpp (22)
ASSERT: "factory" in main.cpp (24)
kdecore (KLibLoader): WARNING: KLibrary: /usr/lib/libkdecore.so.3: undefined
symbol: init_libkipaddr.so
kdecore (KLibLoader): WARNING: KLibrary: The library libkipaddr.so does not
offer
an init_libkipaddr.so function
ASSERT: "factory" in main.cpp (26)
So we notice that:
- none of the calls was successful
- the third call with "kipaddr" is not successful at all
- for all the other calls, some libraries were found
- for the first and second call, there is a warning that tells nothing :
kdecore (KLibLoader): WARNING: library=libkipaddr:
file=/usr/home/philippe/bonobo-controls/kipaddr/kipaddr/.libs/libkipaddr.la:
- for the fourth call, the message is a bit more informative : no
"init_libkipaddr.so" function. I guess that the first two warning are because
there also no "init_libkipaddr.la" in my sources. That is true, my sources
only contains a "init_libkipaddr" function like they should.
So what did I get wrong ? I precise that I use "KDEDIRS=`pwd`; ln -s .libs
lib" setting to make KDE find the libraries but I don't see how it can
influence my problem.
Shall I fetch the init function by myself ? This program is for an article
where simplicity, shortness and ease of use are important, so I would rather
avoid this.
Any help appreciated.
On a side note for the core-developer, the warning message and the doc could
be improved for this problem.
regards,
Philippe
ps: I am not subscribed to this list, so please include me in any reply.
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic