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

List:       kde-bindings
Subject:    Re: [Kde-bindings] Trouble with current smoke and old 'Hello World'
From:       Arno Rehn <arno () arnorehn ! de>
Date:       2008-07-03 12:27:11
Message-ID: 200807031427.11374.arno () arnorehn ! de
[Download RAW message or body]



On Thursday 03 July 2008 10:15:14 Ashley Winters wrote:
> --- On Wed, 7/2/08, Chris Burel <chrisburel@gmail.com> wrote:
> > Now it compiles, but fails to link properly:
> > >g++ -g -I$QTDIR/include
> >
> > -I/home/chris/src/kdebindings/smoke -o hellosmoke2
> > hellosmoke2.c -lqt-mt
> > /tmp/ccQyDQ6w.o: In function `Smoke::findClass(char
> > const*)':
> > /home/chris/src/kdebindings/smoke/smoke.h:376: undefined
> > reference to
> > `Smoke::classMap'
>
> The use of a static Smoke::classMap does an unfortunate job of prohibiting
> use of libsmokeqt.so.2 via dlopen(). I've been bouncing ideas around in my
> head, and the best I could arrive at was an untested patch changing
> classMap to an instance variable, like so:
>
> --- a/smoke/smoke.h
> +++ b/smoke/smoke.h
> @@ -61,9 +61,10 @@ class SmokeBinding;
>  class SMOKE_EXPORT Smoke {
>  private:
>      const char *module_name;
> +    std::map<std::string, Smoke*>& classMap;
>
>  public:
> -    static SMOKE_EXPORT std::map<std::string, Smoke*> classMap;
> +    static SMOKE_EXPORT std::map<std::string, Smoke*> class_map;
>
>      union StackItem; // defined below
>      /**
> @@ -289,6 +290,7 @@ public:
>                 argumentList(_argumentList),
>                 ambiguousMethodList(_ambiguousMethodList),
>                 castFn(_castFn),
> +               classMap(class_map),
>
>                 binding(0)
>                 {
>
> ... along with a corresponding change to kalyptus. Opinions? Arno? :)
Well, that would be possible, yes. But I think this is the wrong usage of the 
smoke lib. You should link against it if you want to use it. I don't see a 
reason why one would want to do this all with dynamic library loading. 
Moreover this wouldn't be cross-platform, which should also be a goal in times 
of Qt4/KDE4 :)

-- 
Arno Rehn
arno@arnorehn.de
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread] 

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