waf - check size of C type at build time -


i want establish build-time cross-language abi compatibility waf. how go checking size of type (or arbitrary type-like checks), , recording build configuration?

you can create program outputs size. saw apporach on several ./configure files:

cat << eof > test.c #include <stdio.h> int main () {     printf("int %d\n", sizeof(int));     return 0; } eof $(cc) test.c -o out ./out >> sizes rm -f test.c out 

of course, testing of erroneous cases , such.

edit: see waf documentation. specially, read run_c_code method. saving value of sizeof can write file instead , read python/waf. or, see define_ret argument.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -