lua-users home
lua-l archive

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

Leo Razoumov wrote:
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/ 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/ 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

I only have tested it with 4.4. But I also had these errors on Mac yesterday,
and later they simply disappear, I don't know why. Could you try to compile
qtcore with method 2 and if it compiles figure out way it doesn't compile with
method 1?

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
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

I linked as, 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/':
        /home/leor/Lua/ undefined symbol: luaopen_qtcore

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


and 'luaopen_qtcore' is not among them.

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

Any help and advice are greatly appreciated.

qtgui needs qtcore and qtnetwork, you see the dependencies at the end of;f=CMakeLists.txt;

build_qt_lib_binding(QtGui QtNetwork QtCore)