与" int32_t exoPal_atoi(char *)不兼容的声明

时间:2015-12-15 03:37:37

标签: c function compiler-errors

即使所述函数的定义和声明相同,我收到的声明也是不兼容的错误。以下是构建后TI Code Composer Studio的错误消息。可能导致这些错误的任何想法?

错误讯息:

'#148 declaration is incompatible with "int32_t exoPal_atoi(char *)" (declared at line 65 of "C:\EK-TM4C129\exosite\exosite_pal.h") exosite_pal.c   /getting_started_with_wlan_station_exosite_write/exosite    line 509    C/C++ Problem
'#148 declaration is incompatible with "int32_t exoPal_sendingComplete()" (declared at line 62 of "C:\EK-TM4C129\exosite\exosite_pal.h")    exosite_pal.c   /getting_started_with_wlan_station_exosite_write/exosite    line 260    C/C++ Problem
exosite_pal.h上的

c函数声明

#ifndef EXOSITE_HAL_H
#define EXOSITE_HAL_H
#include <stdint.h>


/*!< This defines the size of the rx buffer in the PAL.  This buffer is used
   to place incoming data from the modem in.*/
#define RX_BUFFER_SIZE                         512

extern char exoPal_rxBuffer[RX_BUFFER_SIZE];

// defines


// functions for export
void exoPal_init();
uint8_t exoPal_setCik(const char * read_buffer);
uint8_t exoPal_getCik(char * read_buffer);
uint8_t exoPal_getModel(char * read_buffer);
uint8_t exoPal_getVendor(char * read_buffer);
uint8_t exoPal_getUuid(char * read_buffer);

uint8_t exoPal_tcpSocketClose();
uint8_t exoPal_tcpSocketOpen();
uint8_t exoPal_socketRead( char * buffer, uint16_t bufSize, uint16_t * responseLength);
uint8_t exoPal_socketWrite( const char * buffer, uint16_t len);
int32_t exoPal_sendingComplete( );

uint8_t exoPal_itoa(int value, char* str, uint8_t radix);
int32_t exoPal_atoi(char* val);
uint16_t exoPal_strlen(const char *s);
uint8_t exoPal_memcpy(char * dst, const char * src, uint16_t length);
char* exoPal_strstr(const char *in, const char *str);


#endif
exosite_pal.c上的

c函数定义

#include "exosite_pal.h"

#include "simplelink.h"
#include <stdio.h>
#include <stdlib.h>

int32_t exoPal_sendingComplete()
{
    return 0;
}

int32_t exoPal_atoi(char* val)
{
    return atoi(val);
}

0 个答案:

没有答案