我的代码中包含这些行。我还将文件包含在项目中的标题列表中。但是在编译时我得到了以下错误。我的错是什么?
#ifndef WIN32
# include <netinet/in.h>
# include <arpa/inet.h>
# include <unistd.h>
# include <netdb.h>
# include <sys/socket.h>
# include <sys/un.h>
# include <pwd.h>
# include <grp.h>
#else
# include "getopt.h"
# include <stdarg.h>
# pragma comment (lib, "wpcap.lib")
#endif /* ^WIN32 */
错误1致命错误C1083:无法打开包含文件:'getopt.h':没有这样的文件或目录c:\ filetry.c
答案 0 :(得分:0)
getopt不是可视化的标头。这可能会有所帮助:http://www.codeguru.com/forum/archive/index.php/t-393293.html