lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Mauro and Peter,
I am trying to build lqt from the git repo master branch (34cbc05a9318)
under Ubuntu-7.04 Feisty Fawn with Qt-4.2.3 and gcc-4.2.1.
I tried both methods described in the BUILD file and they did not work for me.

(1) Using cmake, I got the following compile-time errors:

/usr/include/qt4/QtCore/qtextstream.h:233: error: 'QTextStream::QTextStream(const QTextStream&)' is private
/home/leor/Devel/Lua/lqt.LR.build/qtcore_src/qtcore_head_QTextStream.hpp:19: error: within this context
/usr/include/qt4/QtCore/qdatastream.h: In constructor 'lqt_shell_QDataStream::lqt_shell_QDataStream(lua_State*, const QDataStream&)':
/usr/include/qt4/QtCore/qdatastream.h:153: error: 'QDataStream::QDataStream(const QDataStream&)' is private
/home/leor/Devel/Lua/lqt.LR.build/qtcore_src/qtcore_head_QDataStream.hpp:17: error: within this context
make[2]: *** [CMakeFiles/qtcore.dir/qtcore_src/qtcore_merged_build.cpp.o] Error 1
make[1]: *** [CMakeFiles/qtcore.dir/all] Error 2

These errors make sense to me. lqt expects Qt-4.4 and I only have Qt-4.2.3

So I decided to recreate lqt bindings using method (2)

(2). I followed the BUILD instructions for the method 2 using 'qmake-qt4'.
	In Ubuntu-7.04 'qmake' is for Qt-3


cd cpptoxml
qmake-qt4
make
cd ..

mkdir ./src
echo '#include <QtGui>' > ./src/qtgui.cpp

./cpptoxml/cpptoxml -Q /usr/include/qt4 -C cpptoxml/parser/rpp/pp-qt-configuration ./src/qtgui.cpp > src/qtgui.xml

mkdir qtgui_src

lua generator/generator.lua src/qtgui.xml -i QtGui -i lqt_qt.hpp -n qtgui -t generator/types.lua -t generator/qtypes.lua -f generator/qt_internal.lua

cp common/lqt_*.?pp qtgui_src/
cd qtgui_src/
qmake-qt4 -project -template lib -o qtgui.pro
qmake-qt4 qtgui.pro
make

I linked libqtgui.so.1.0.0 as qtcore.so, and placed it where require can find it.

When trying to run test/t1.lua got Lua error:

lua: error loading module 'qtcore' from file '/home/leor/Lua/qtcore.so':
        /home/leor/Lua/qtcore.so: undefined symbol: luaopen_qtcore

After close inspection with "nm -A -C" found out that my qtcore.so
only defines the following 'luaopen_*' functions

 luaopen_QTextBlockGroup
 luaopen_QTextFrameLayoutData
 luaopen_QTextObject
 luaopen_qtgui

and 'luaopen_qtcore' is not among them.

I guess one needs to export to Lua more than just qtgui bindings. Also renaming libqtgui.so into qtcore.so looks suspicious:-)

Any help and advice are greatly appreciated.

Thanks,
--Leo--