English 中文(简体)
使用日食时的 Qt, # 包括 # QSqlDatabase> 导致找不到文件
原标题:Using Qt with eclipse, #include <QSqlDatabase> leads to file not found

因此,我启动了一个新的Qt控制台项目;

至今为止, 一切工作都很顺利。 我对整合设置了日蚀, 但我实际上没有使用, 我刚刚加入了相关的 Qt 目录, 这样我的 < code\\\ 包括 & lt; QtGui> 调用工作 。

到目前为止,所有这些工作都非常顺利。

i 可以用日食构建选项或通过实践来编译它

qmake -project
qmake
make

从指挥线开始 两个都工作

包括i已有的报表;是:

#include <QtGui>
#include <QApplication>

在两个不同的文件中。

如果我加上另一个的话, 即 , 那么日食会承认包含, 并允许我启动新的变量, 并使用 QSqlDatabase 类。 一切看起来都很好 - < a href=" https://i. static. net/ E8pmV.jpg" rel=“ no follow” > 见这里 - 日蚀屏幕抓图

当我建造这个项目时,它决定它看不到文件,即使它们都存在 , < a href=>也见于终端 。然后

如果我进入目录, 并试图通过终端完成, 使用 qmake - project; qmake; 做出 , 那么我就会有相同的错误 。

但如果我进入 .pro 文件, 由 qmake - project 创建, 并添加行

为何qmake - project 将这些文件从工程文件中剔除? 我真的不想每次我建造时 都用手动添加该行...

最佳回答
问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签