QT
把AUTOUIC开启后
cmake通过add进executable的file中的include 语句判断ui文件
其中在include同级目录或者CMAKE_AUTOUIC_SEARCH_PATHS变量下寻找该ui文件
具体见https://cmake.org/cmake/help/latest/variable/CMAKE_AUTOUIC_SEARCH_PATHS.html#variable:CMAKE_AUTOUIC_SEARCH_PATHS
Vscode 调试Makefile
第一个方式,直接修改launch.json
这个文件从ece220/mps/mp10/.vscode/.launch.json
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/mp10",
"args": [
"graph",
"requests",
"0"
],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
第二个方式,通过Makefile插件
然后打开workspace
的settings.json
,修改makefile.launchConfigurations
{
"makefile.launchConfigurations": [
{
"cwd": "/home/ztn/Documents/cs225sp24/lab_debug",
"binaryPath": "/home/ztn/Documents/cs225sp24/lab_debug/sketchify",
"binaryArgs": ["in_111","sddsd"]
}
]
}
stm32重定向printf
需要修改fputc
,或者write
, 因为不同库实现不一样,而且gcc的newlib版本不同,新版本需要修改write