getcwd was not declared in this scope
来源:互联网 发布:mysql书籍推荐知乎 编辑:程序博客网 时间:2024/05/21 13:57
Environment: Fedora 22 + QT
Aim: get current working directory.
Code example:
char* buffer; if((buffer=getcwd(NULL,0))==NULL){ perror("getcwd error"); }else{ printf("%s\n",buffer); free(buffer); }
Error:
getcwd was not declared in this scope
Solution: add following code in your source file:
#include <unistd.h>
0 0
- getcwd was not declared in this scope
- ‘cout’ was not declared in this scope
- 'wxCHANGE_DIR' was not declared in this scope
- 'setenv' was not declared in this scope
- 'UINT64_C' was not declared in this scope
- ‘UINT64_C’ was not declared in this scope
- ‘close’ was not declared in this scope
- was not declared in this scope
- Connect was not declared in this scope
- 'XXX' was not declared in this scope
- nullptr was not declared in this scope
- ‘close’ was not declared in this scope
- '_fileno' was not declared in this scope
- ‘inet_pton’ was not declared in this scope
- ioctl'was not declared in this scope
- FIONBIO was not declared in this scope
- offsetof' was not declared in this scope
- ‘close’ was not declared in this scope
- Sae Storage使用——之图片服务器
- within group
- Eclipse部署Maven web项目到tomcat服务器时,没有将lib下的jar复制过去的解决办法
- 百度API—身份证查询
- 深入理解Android消息处理系统——Looper、Handler、Thread
- getcwd was not declared in this scope
- js的运用
- 销售订单配置项目说明
- Redis从0到1——Redis基础教程
- iOS 缓存机制 (以SDWebImage 缓存图片为例)
- java反射的应用
- http长轮询&短轮询
- ORA-12504:TNS:监听程序在CONNECT_DATA中未获得SERVICE_NAME
- 1.8 Rotate Matrix