Sunday, September 18, 2011

Compiling Z3 programs on Ubuntu 11.04

I was getting some errors while trying to compile program that uses Z3 on Ubuntu 11.04.
/usr/include/c++/4.5/bits/locale_facets.h: In member function ‘iter_type std::num_get<_CharT, _InIter>::get(iter_type, iter_type, std::ios_base&, std::ios_base::iostate&, bool&) const’:
/usr/include/c++/4.5/bits/locale_facets.h:1958:33: error: expected primary-expression before ‘,’ token

The reason: __out and __in definitions in z3.h, z3_api.h interfere with variable names in c++locale.h and other system files.

To solve the problem undefine macroses difined in 
z3.h file, just add to the end of file:

#undef __in
#undef __out
#undef __inout
#undef __in_z
#undef __out_z
#undef __ecount
#undef __in_ecount
#undef __out_ecount
#undef __inout_ecount

Friday, September 9, 2011

Saturday, April 16, 2011

If Eclipse indexer cannot find standard include files - go to 
Project -> Properties -> C/C++ Build -> Tool Chain Editor
and add tool chain.