• 4046阅读
  • 2回复

develop问题~~ [复制链接]

上一主题 下一主题
离线wbj1984
 
只看楼主 倒序阅读 楼主  发表于: 2008-06-15
— 本帖被 XChinux 执行加亮操作(2008-06-16) —
我在linux下用KDevelop建立了一个纯c++的工程,用的是示例的hello world的程序。但是一编译就会出现下面的问题。
这是程序
#include <qapplication.h>
#include <qlabel.h>

int main(int argc, char **argv)
{
    QApplication app(argc, argv);

    QLabel *label = new QLabel("Hello, Qt!", 0);
    label->setAlignment(Qt::AlignVCenter|Qt::AlignHCenter);
    label->setGeometry(10, 10, 200, 80);
    app.setMainWidget(label);
    label->show();

    int result = app.exec();
    return result;
}


aclocal.m4:3009: your implementation of AM_INIT_AUTOMAKE comes from an
aclocal.m4:3009: old Automake version. You should recreate aclocal.m4
aclocal.m4:3009: with aclocal and run automake again.
gmake: *** [Makefile.in] Error 1
gmake[1]: Leaving directory `/root/exam_c'
gmake: *** [all] Error 2
*** 失败 ***

这是什么原因?
离线lzian
只看该作者 1楼 发表于: 2008-06-16
Solution: Under the "Build" menu, you'll see two selections. 1- for "Autoconf and automake" and 2- "Configure". If you make changes at the project level like changing options, adding libs, etc. You need to run autoconf and automake, and Configure to recreate the makefiles. Normally, to test out code changes and just make (build) the project, you'd just press F8 or use the Build -> Make menu. Here's another one that you might run into... To add libraries to the project. goto Project -> options (or press F7) and then select "Linker Options". In the "Additional Libraries" box, enter the library to use using the -l prefix. For example, if you're using libcrypto.a then enter -lcrypto. Of course, you'd have to autoconf/automake, and configure again after this change.
离线wbj1984
只看该作者 2楼 发表于: 2008-06-18
谢谢~~
快速回复
限100 字节
 
上一个 下一个