在vscode中写C语言,包含了mysql.h,直接调试正常,用code runner就不行。

#include <mysql.h>
#include <stdio.h>
#include <string.h>

int main(void) {
    printf("谢谢!");
}

 

就是上面这段代码,c_cpp_properties.json和task.json都将mysql的include路径放进去了,直接调试完全正常,但是只要用code runner运行就显示:fatal error: mysql.h: No such file or directory。

请问怎么能用code runner正常运行啊?

可以参考 code runner的配置:https://blog.csdn.net/PegasiTIO/article/details/89225352

#include "mysql.h"//改成这样
#include <stdio.h>
#include <string.h>
int main(void) {
    printf("谢谢!");
}