0
我有一个c程序,它运行完美,但现在我想在Windows中运行它。所以我试图编译Windows 7操作系统中的代码,使用Turboc3。 当我编译时,出现错误“无法打开包含文件Protocols.h” 但Protocols.h文件存在于目录中。所有的目录都在C编译器中完美设置。无法使用C编译器打开包含文件“Protocols.h”
从.c文件它将包含一个.h文件,并从该.h文件包含另一个.h文件。
但我仍面临同样的问题,任何人都可以帮助我。
标头,我是象下面这样:
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <signal.h>
//#include <wait.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/types.h>
//#include <ipc.h>
//#include <shm.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define socklen_t int
/* limit values */
#define MAX_TAGS 500
#define MAX_OBJECTS 500
#include "Protocols.h"
验证您的文件名是否与包含的文件名相同,并且位于您的* .c文件所在的同一目录中。 – 2015-01-21 06:48:44
如果该文件是在Linux下编辑的,那么'在Windows环境中再次用引号(“”)重新输入文件名。 – 2015-01-21 07:44:00
这个古老的Turbo-C版本是否支持“long”(> 8.3个字符)文件名?尝试将文件重命名为“Protocol.h”。 – alk 2015-01-21 08:57:02