Using talloc in an embedded windows project

Rodney Elliott rodney.elliott at gmail.com
Mon Jan 21 01:33:03 MST 2013


Hi Matthieu.

I am not sure exactly what information you are asking for, so I will try my
best to cover all options. I have a simple test project whose code contains
calls to talloc functions.

I am at the stage where I am unable to compile this code as GCC complains about
not being able to find 'config.h'. Whenever I attempt to run the command 'waf
configure' in python when in the .\talloc-2.0.8\buildtools\bin directory, I
get the following error:

>>> waf configure
SyntaxError: invalid syntax

Likewise with:

>>> waf --version
Traceback (most recent call last):
  File "<pyshell#17>", line 1, in <module>
    waf --version
NameError: name 'waf' is not defined

This may well be a problem with the way I am using waf (being a total python
neophyte - I am assuming the waf configure command is correct based upon the
Stack Overflow post I mentioned), or the way I am using (or abusing) python,
rather than a problem with waf itself.

If on the other hand you wish to know the errors the compiler throws if I
create a blank 'config.h' file, I have included the first few below - please
let me know if you want the whole lot.

--------------- Build Started: 01/21/2013 20:32:21 Project:
talloc_include_test, Configuration: ARM GCC 4.4.1 Debug
---------------
The code generation step is up to date.
arm-none-eabi-gcc.exe -I. -Wno-main -I./Generated_Source/PSoC5
-mcpu=cortex-m3 -mthumb -I .\talloc-2.0.8 -I
.\talloc-2.0.8\lib\replace -Wall -g -D DEBUG
-Wa,-alh=.\CortexM3\ARM_GCC_441\Debug\main.lst -ffunction-sections -c
.\main.c -o .\CortexM3\ARM_GCC_441\Debug\main.o
.\main.c: In function 'main':
.\main.c:12: warning: unused variable 'user'
arm-none-eabi-gcc.exe -I. -Wno-main -I./Generated_Source/PSoC5
-mcpu=cortex-m3 -mthumb -I .\talloc-2.0.8 -I
.\talloc-2.0.8\lib\replace -Wall -g -D DEBUG
-Wa,-alh=.\CortexM3\ARM_GCC_441\Debug\talloc.lst -ffunction-sections
-c .\talloc-2.0.8\talloc.c -o .\CortexM3\ARM_GCC_441\Debug\talloc.o
In file included from .\talloc-2.0.8\talloc.c:33:
.\talloc-2.0.8\lib\replace/replace.h:626: error: conflicting types for
'ptrdiff_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc
creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/include/stddef.h:149:
note: previous declaration of 'ptrdiff_t' was here
.\talloc-2.0.8\lib\replace/replace.h:848: error: conflicting types for
'useconds_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc
creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/types.h:253:
note: previous declaration of 'useconds_t' was here
.\talloc-2.0.8\talloc.c:123: error: expected specifier-qualifier-list
before 'uint8_t'
.\talloc-2.0.8\talloc.c: In function 'talloc_chunk_from_ptr':
.\talloc-2.0.8\talloc.c:369: warning: cast from pointer to integer of
different size
.\talloc-2.0.8\talloc.c:369: warning: cast to pointer from integer of
different size

Kind Regards

 - Rodney


More information about the samba-technical mailing list