expected declaration specifiers or ‘...’ before
来源:互联网 发布:简单概括java四大特点 编辑:程序博客网 时间:2024/05/03 20:11
原因:头文件包含混乱!!
实例:
In file included from ftpp.h:6:0,
from ftpp.c:2:
parser.h:17:30: 错误:expected declaration specifiers or ‘...’ before ‘tFtpMsg’
parser.h:19:30: 错误:expected declaration specifiers or ‘...’ before ‘tFtpMsg’
parser.h:
================
#ifndef _PARSER_H_
#define _PARSER_H_
#include "ftpp.h" //这里等于包含来自己
ftpp.h:
================
#ifndef _FTPP_H
#define _FTPP_H
#include "sockwrapper.h"
#include "common.h"
#include "parser.h" //这里是错误包含,ftpp.h中用不到parser.h,如果ftpp.h中用到parser.h中定义到数据
//那么将parser.h中定义的部分放到ftpp.h中,
//然后将此条包含删除,避免循环包含!!!!!!!!!
#include <pthread.h>
parser.c:
================
#include "parser.h"
#include "sockwrapper.h"
#include <string.h>
- expected declaration specifiers or ‘...’ before
- error: expected declaration specifiers or '...' before错误
- error: expected declaration specifiers or '...' before ***
- error expected declaration specifiers or ‘...’ before ‘SElemType’
- error: expected declaration specifiers or '...' before错误
- gcc:编译 expected declaration specifiers or ‘...’ before
- expected declaration specifiers or '...' before string constant
- error: expected declaration specifiers or ‘...’ before string constant
- 【错误】error: expected declaration specifiers or ‘...’ before string constant
- 【错误笔记】error: expected declaration specifiers or '...' before XXX
- expected declaration specifiers or '...' before string constant编译告警
- error: expected declaration specifiers before ‘return’
- error: expected declaration specifiers or '...' before xxx(xxx是函数形参)
- 安装PHP时 jpeglib.h:954: error:expected declaration specifiers or ‘...’ before ‘FILE’ 错误解决
- /sysroot/usr/include/search.h:19: error: expected declaration specifiers or '...' before '__free_fn_
- /home/zhang/code/hello/hello.c:3: error: expected declaration specifiers or ‘...’ before string cons
- linux error: expected declaration specifiers or '...' XXX
- error: expected declaration specifiers or '...' 问题解决
- 学习Live555 (一)
- sqlserver汇总
- 居中的waiting for
- 关于Flex4不生成mxml对应的html文件的解决方法-------无法打开"D:/MyEclipse 8.5/项目名称/WebRoot/WEB-INF/flex/local/zh_CN"
- maven下载错误jar文件导致项目出现错误
- expected declaration specifiers or ‘...’ before
- linux fork函数浅析
- Android 模拟器分辨率
- Poj 1936
- 莫让自己心累
- c#画线Graphics
- spring整合servlet
- Asp.net 默认配置下,Session莫名丢失的原因及解决办法
- Web开发者10大技能