unresolved symbols from value.cpp/.h

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Fri Jan 20 17:55:00 GMT 2006

Hash: SHA1

Maks Orlovich schrieb:
> On Friday 20 January 2006 10:37, Christian Ehrlicher wrote:
>>While trying to get kj\s compile on windows, I now have some problems
>>with unresolved smybols. It looks like there are a lot of functions not
> Hi. 
> This chunk is definitely NOT good:
> -    KJS_EXPORT static bool collect();
> +    static bool collect();
> Ditto for this:
> --- internal.h  (revision 500568)
> +++ internal.h  (working copy)
> @@ -403,7 +403,7 @@
>      bool hasInstance(ExecState *exec, ValueImp *value);
>      virtual const ClassInfo *classInfo() const { return &info; }
> -    KJS_EXPORT static const ClassInfo info;
> +    static const ClassInfo info;
Why not? You export the class so there is no need (and msvc produces an
error) to explicit export a function of this exported class.

> Also, IMHO, you shouldn't  do these:
> -  struct ClassInfo {
> +  class ClassInfo {
> +  public:
> but rather fix the uses.
everywhere else in kdelibs it was changed from struct -> class so I did
here too.
>>ValueImp::ValueImp(class KJS::ValueImp const &)
> This is intentional, to prevent accidental copying.
Ok, let's try to explain why this is needed. We had such a problem some
time ago (Thiago Macieira was hard to convince).
Msvc can't export a half implemented class (it doesn't know anything
about weak symbols) - so you've only two options
a) don't export ths class (which seems to be the best solution because
you said it's an internal one)
b) implement all functions
>>also it looks like kxmlcore doesn't export anything but kjs depends on
> There are no out-of-line symbols there except in debug builds. It probably 
> shouldn't even build a library.
It's only one function and maybe has something to do with
template<typename PairType>
inline typename PairType::first_type extractFirst(const PairType& value)
    return value.first;
in kxmlcore/HashMap.h - I'll take a look.

property_slot.cpp isn't defined as source in SConscript (this was one of
my four unresolved symbols I have).

Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the kde-core-devel mailing list