I'm interested in doing some work on getting smoke2-based perl bindings for Qt4.  To get my feet wet, I grabbed the 'hello.c' file mentioned in this post:<br><a href="http://lists.kde.org/?l=kde-bindings&m=112890653817358">http://lists.kde.org/?l=kde-bindings&m=112890653817358</a><br>
<br>I can get it to compile when I use the smoke.h from Perl-Qt3, but I can't get it to work with the current svn snapshot, which for the record is 827027.<br><br>>g++ -g -I$QTDIR/include -I/home/chris/src/kdebindings/smoke -o hellosmoke2 hellosmoke2.c -lqt-mt<br>
hellosmoke2.c: In function 'short int getMethod(Smoke*, const char*, const char*)':<br>hellosmoke2.c:53: error: cannot convert 'Smoke::ModuleIndex' to 'short int' in initialization<br>hellosmoke2.c: In function 'void smokeCast(Smoke*, short int, Smoke::StackItem*, short int, void*, const char*)':<br>
hellosmoke2.c:79: error: no matching function for call to 'Smoke::cast(void*&, Smoke::ModuleIndex, short int&)'<br>/home/chris/src/kdebindings/smoke/smoke.h:311: note: candidates are: void* Smoke::cast(void*, short int, short int)<br>
hellosmoke2.c: In function 'void smokeCastThis(Smoke*, short int, Smoke::StackItem*, void*, const char*)':<br>hellosmoke2.c:85: error: no matching function for call to 'Smoke::cast(void*&, Smoke::ModuleIndex, short int&)'<br>
/home/chris/src/kdebindings/smoke/smoke.h:311: note: candidates are: void* Smoke::cast(void*, short int, short int)<br><br>I took a look at how the smoke.h had changed, and discovered that the Smoke::ModuleIndex is just a struct, that contains the index.  So I changed the lines to get the index from the ModuleIndex struct:<br>
53c53<br><     Smoke::Index method = smoke->findMethod(c, m);<br>---<br>>     Smoke::Index method = smoke->findMethod(c, m).index;<br>79c79<br><     args[i].s_class = smoke->cast(obj, smoke->idClass(className), smoke->types[arg].classId);<br>
---<br>>     args[i].s_class = smoke->cast(obj, smoke->idClass(className).index, smoke->types[arg].classId);<br>85c85<br><     args[0].s_class = smoke->cast(obj, smoke->idClass(className), smoke->methods[method].classId);<br>
---<br>>     args[0].s_class = smoke->cast(obj, smoke->idClass(className).index, smoke->methods[method].classId);<br><br><br>Now it compiles, but fails to link properly:<br>>g++ -g -I$QTDIR/include -I/home/chris/src/kdebindings/smoke -o hellosmoke2 hellosmoke2.c -lqt-mt<br>
/tmp/ccQyDQ6w.o: In function `Smoke::findClass(char const*)':<br>/home/chris/src/kdebindings/smoke/smoke.h:376: undefined reference to `Smoke::classMap'<br>/tmp/ccQyDQ6w.o: In function `Smoke::findMethodName(char const*, char const*)':<br>
/home/chris/src/kdebindings/smoke/smoke.h:412: undefined reference to `Smoke::classMap'<br>/tmp/ccQyDQ6w.o: In function `Smoke::findMethod(Smoke::ModuleIndex, Smoke::ModuleIndex)':<br>/home/chris/src/kdebindings/smoke/smoke.h:451: undefined reference to `Smoke::classMap'<br>
collect2: ld returned 1 exit status<br><br>I've actually got a really simple class that just has a few properties and methods that I'm testing out smoke on, that has the same errors.  I used the current snapshot to run kalyptus on my header file to give me smoke code, to compile my own smoke .so.  Getting the smoke .so file works fine, it's just this example of how to call the functions in the .so that I can't get to work.<br>
I'm stumped.  Could someone help?<br>