如何使用Qt Creator 开发普通C++项目
相信很多人有这样的需求吧
推荐使用 Qt Creator 2.1 以上版本,因为自带了 Class View ,不需要第三方的插件就可以看Symbol了。
新建项目里,选择 Other Project 然后是 Import Existing Project,建立项目后添加文件,最后需要的是自己写一个 Makefile, 而且默认的 Build 目标是 all,注意 GNU make 的文件格式,命令行开头需要一个完整的 TAB
针对最简单的单文件,比如 main.cpp ,makefile 可以这样写
all: g++ -o main main.cpp
然后就可以了。
如果你自己添加的第三方库也可以提供自动补全功能,但是需要能搜索到这个库目录,我用的是 Mingw ,直接把第三方库放到 Mingw 对应的 include 和 lib 目录了,引用头文件之后自动补全很好很强大。应该也有环境变量来设置的,不过暂时不大清楚如何操作。
Feb 01, 2024 09:06:50 PM
I am truly getting a charge out of perusing your elegantly composed articles. It would seem that you spend a considerable measure of exertion and time on your blog. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome. concierge doctor
Nov 25, 2024 05:29:19 AM
Whoa, this is such a great post. This is just too much informatics, in my opinion. That's what I was looking for.I would want to ask that you continue to share this kind of information.Regards cambodia visa for colombian citizens
Dec 06, 2024 11:31:03 AM
Chao mung ban den voi shidefc.com – diem den hang dau danh cho nhung ai dam me ca cuoc va giai tri truc tuyen!
Dec 29, 2024 09:26:48 PM
You did a fantastic job writing this essay. It is quite accurate and superior in quality. Even so, you've succeeded in making it easy to read and readable. You're a really talented writer. I really appreciate it. visa online for eswatini