-->
Page 1 of 1

Conflicting declaration of unit32_t and uint32_t

PostPosted: Fri Feb 19, 2016 10:46 am
by Wamor
Hello,

I am new to the ESP8266 and am learning to use the product.

I have made a small cpp-program and when compiling I got the following errors:

conflicting declaration 'typedef int int32_t' line 80, external location: c:\espressif\xtensa-lx106-elf\xtensa-lx106-elf\include\stdint.h
previous declaration as 'typedef long int int32_t' line 17, external location: c:\Espressif\ESP8266_SDK\include\c_types.h

Looks like something is redefining int32_t.
My program look like this:
#include "espmissingincludes.h"
#include <osapi.h>

extern "C" void user_rf_pre_init(void)
{
}

extern "C" void user_init(void)
{
os_delay_us(1000);
}

In stdint.h I see the following lines:
#if TENSILICA || 1
typedef signed int int32_t;
typedef unsigned int uint32_t;
#else
typedef signed long int32_t;
typedef unsigned long uint32_t;
#endif

What is TENSILICA and why int32_ and uint32_t forced to be int's.

Can somebody help me to solve this problem.

Thank you and best regards,

Wamor

Re: Conflicting declaration of unit32_t and uint32_t

PostPosted: Sun Feb 21, 2016 10:00 pm
by jcmvbkbc
Wamor wrote:conflicting declaration 'typedef int int32_t' line 80, external location: c:\espressif\xtensa-lx106-elf\xtensa-lx106-elf\include\stdint.h
previous declaration as 'typedef long int int32_t' line 17, external location: c:\Espressif\ESP8266_SDK\include\c_types.h

Just remove definitions of int/uint 8..64 from c_types.h and replace it with #include <stdint.h> -- should work regardless of the typedef in the stdint.h

Re: Conflicting declaration of unit32_t and uint32_t

PostPosted: Mon Jul 18, 2016 2:19 am
by eriksl
Exactly. OpenSDK already does that. The types from Espressif are simply wrong.