zoukankan      html  css  js  c++  java
  • 【Qt开发】 QT:make: Nothing to be done for `first'和error:QtSql:No such file or directory

    http://blog.csdn.NET/heqiuya/article/details/7774208


    这是QT编程中常见的两个编译错误.可能你的代码在window下编译能正常通过,可是到到Linux下编译就出现这个问题.解决方案如下:

    在你编译QT代码之前最好先make clean一下, 因为*.o之类的文件可能影响到编译.


    在qt目录下make后出现以下错误:

    make: Nothing to be done for `first'

    解决:将你当前目录下的,删除你程序主要的 *.cpp 和 *.h文件以外的所有文件。

    接着执行:

    #qmake  -project

    #qmake

    #make

    运行正常。



    QtNetwork: No such file or directory 问题的解决

    最近学习Qt,在Qt4.3.2版本编译包含如下头文件时
    #include <QtNetWork>
    程序在nmake时出现
    server.h:7:21: error: QtNetwork: No such file or directory

    终于找到了解决办法
    在当前目录下找到 .pro文件
    在其中手工添加一行:
    QT += network

    具体操作步骤如下
    1: qmake -project
    2: 手工添加 Qt += network
    3: qmake
    4: nmake

    OK,一切正常(假如代码中没有错误)
  • 相关阅读:
    Java.io.outputstream.PrintStream:打印流
    Codeforces 732F. Tourist Reform (Tarjan缩点)
    退役了
    POJ 3281 Dining (最大流)
    Light oj 1233
    Light oj 1125
    HDU 5521 Meeting (最短路)
    Light oj 1095
    Light oj 1044
    HDU 3549 Flow Problem (dinic模版 && isap模版)
  • 原文地址:https://www.cnblogs.com/huty/p/8517602.html
Copyright © 2011-2022 走看看