`

conflicting types for

 
阅读更多

错误:
test.c:22: error: conflicting types for 'urlencode'
test.c:18: error: previous implicit declaration of 'urlencode' was here

 

原因一:
原来是因为没有先做函数声明,而函数位于main()之后。
在main函数前声明了函数原型后,一切ok.

 

原因二:

头文件的被循环引用,在引用时考虑清楚包含顺序

 

原因三:

头文件声明和定义参数稍有不同

例:

 头文件中声明 void Hanlder(const char * buf);

 在定义时写作 void Hanlder(char * buf);

这是就会发生conflicting types for 错误问题

 

大家编程多注意即可

部分来自:http://www.cnblogs.com/gudai/archive/2006/07/26/460133.html

0
0
分享到:
评论

相关推荐

    MinGW -w64-for window 32bit or 64 bit

    MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit MinGW -w64-for window 32bit or 64 bit

    qt关于编译fontconfig缺少的头文件

    在Qt开发过程中,有时会遇到编译问题,特别是涉及到字体渲染时,可能因缺少特定的头文件而导致编译失败。本话题主要关注“qt关于编译fontconfig缺少的头文件”,这个问题通常出现在尝试构建Qt环境以支持不同平台,如...

    libfaketime:libfaketime修改单个应用程序的系统时间

    **标题与描述解析** 标题"libfaketime:libfaketime修改单个应用程序的系统时间"揭示了一个名为libfaketime的库,其主要功能是允许开发者在不改变全局系统时间的情况下,针对特定的应用程序调整时间环境。...

    Asterisk系统的安装与配置

    在安装DAHDI时,可能会遇到CONFLICTING TYPES FOR ‘BOOL’错误,这可以通过Google搜索解决。 二、安装Asterisk 下载Asterisk的安装包asterisk-1.8.7.1.tar.gz,然后按照以下步骤安装: 1. tar zxvf asterisk-1.8...

    win 3.11 for workgroup tcpip支持

    DHCP option types, 336 bytes should be sufficient for any configuration. Ipconfig - Moving Client to New Address --------------------------------------- When a DHCP client is moved to a new reserved ...

    Nonlinear Multiobjective Optimization(kaisa)

    However, many real-life phenomena are of a nonlinear nature, which is why we need tools for nonlinear programming capable of handling several conflicting or incommensurable objectives. In this case, ...

    Report of Web Intelligence Research at the WIC Beijing Center

    The report mentions two types of recommendation systems for e-Business: 1. **Collaborative Filtering**: This type of recommendation system relies on past user behavior to predict future preferences. ...

    Bochs - The cross platform IA-32 (x86) emulator

    - Added support for VGA graphics mode with 400 lines (partial fix for SF bug #2948724) - NE2K: Fixed "send buffer" command issue on big endian hosts - USB - converted common USB code plus devices ...

    Protel中ERC错误中英对照大全

    * Mismatched electrical types on bus:总线上错误的电气类型 * Mismatched generics on bus (first index):总线范围值的首位错误 * Mismatched generics on bus (second index):总线范围值末位错误 * Mixed ...

    AD系列DRC+规则中英文对照.doc

    * Mismatched electrical types on bus 总线上错误的电气类型 * Mismatched generics on bus (first index) 总线范围值的首位错误 * Mismatched generics on bus (second index) 总线范围值末位错误 * Mixed ...

    DXP2004 DRC 规则英文对照

    9. **Mismatched electrical types on bus**:总线上错误的电气类型,比如数字信号和模拟信号混连。 10. **Mismatched generics on bus (first index)**:总线范围值的首位错误,通常与参数化设计有关。 11. **...

    AltiumDesigner(DXP)错误提示解释可用.pdf

    9. Mismatched electrical types on bus:总线上错误的电气类型。 10. Mismatched generics on bus (first index):总线范围值的首位错误。 11. Mismatched generics on bus (second index):总线范围值末位错误。 ...

    DXP2004 DRC 规则英文对照 pdf

    - **Mismatched electrical types on bus** 总线上错误的电气类型:总线上的电气类型设置不一致。 - **Mismatched generics on bus (first index)** 总线范围值的首位错误:总线范围内首位索引的设置不正确。 - **...

    DXP2004 DRC中英文对照

    9. **Mismatched electrical types on bus 总线上错误的电气类型** 在同一总线上混合使用了不同类型的电气信号。 10. **Mismatched generics on bus (first index) 总线范围值的首位错误** 总线范围值的第一位...

    ERC错误报告类型中英文

    9. **Mismatched electrical types on bus**:总线上不同电气类型的信号混合可能导致逻辑错误。 10. **Mismatched generics on bus (first index)**:总线范围值的首位不匹配可能导致数据解析错误。 11. **...

    The way to go

    Chapter 4—Basic constructs and elementary data types.......................................................49 4.1. Filenames—Keywords—Identifiers......................................................

    电器规则检查

    9. Mismatched electrical types on bus 总线上错误的电气类型:这类错误发生在总线上电气类型不正确,导致电气连接错误。 10. Mismatched generics on bus (first index) 总线范围值的首位错误:这类错误发生在...

    [Go语言入门(含源码)] The Way to Go (with source code)

    Chapter 4—Basic constructs and elementary data types.......................................................49 4.1. Filenames—Keywords—Identifiers......................................................

Global site tag (gtag.js) - Google Analytics