|
本帖最后由 Qter 于 2018-2-24 12:28 编辑
右键 DoraemonSolution 新建子项目->Library->C++库
从 https://github.com/devbean/log4qt 下载源码
把源码拷贝到当前新建的工程下
修改工程文件QLoggingLib.pro 增加如下一行代码:
include(log4qt/log4qt.pri)
Doraemon中添加对日志的依赖
右键 Doraemon ->添加库-> 内部库
步后,将在Doraemon.pro文件添加如下代码- win32:CONFIG(release, debug|release): LIBS += -L$OUT_PWD/../QLoggingLib/release/ -lQLoggingLib
- else:win32:CONFIG(debug, debug|release): LIBS += -L$OUT_PWD/../QLoggingLib/debug/ -lQLoggingLib
- else:unix: LIBS += -L$OUT_PWD/../QLoggingLib/ -lQLoggingLib
- INCLUDEPATH += $PWD/../QLoggingLib
- DEPENDPATH += $PWD/../QLoggingLib
- win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $OUT_PWD/../QLoggingLib/release/libQLoggingLib.a
复制代码 |
-
1.png
(24.62 KB, 下载次数: 660)
|