gcc: 3.3.3 20040412
qte: qt-embedded-free-3.3.6
kde-lib: kdelibs-3.5.3
koffice: koffice-1.5.1
自己写的测试程序(main.cpp,见附录),编译通过,然后运行 qvfb -width 640 -height 480 & ,接着运行测试程序./main -qws 出现以下错误:
./main: error while loading shared libraries: libkdecore.so.4: cannot open shared object file: No such file or directory
估计是因为在系统库中找不到libkdecore.so,于是ldconfig -p | grep libkdecore ,果然没找到,于是手动添加一下,vi /etc/ld.so.conf,增加/usr/local/kde/lib目录,再运行ldconfig更新一下就OK了。
#main.cpp for test
#include
#include
#include
int
main (int argc, char **argv)
{
KApplication *a;
a = new KApplication (argc, argv, "p2");
QPushButton *hello = new QPushButton (i18n ("Hello World !"), 0);
a->setMainWidget (hello);
hello->show ();
return a->exec ();
}
没有评论:
发表评论