ATF-devel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

examples need updating



I'm trying to get started using ATF, looking at the examples here:

http://www.netbsd.org/~jmmv/atf/examples.html

Example #2 (the shell one) builds easily enough, but the C++ one doesn't. <atf.hpp> needs to be <atf-c++.hpp> and the pkg-config args should be "atf-c++", not "atf". Building then gives this error:

$ gcc $(pkg-config --cflags atf-c++) -o t_example_1.o -c t_example_1.cpp
t_example_1.cpp: In member function ‘virtual void atfu_tc_pow_func::head()’:
t_example_1.cpp:12: error: ‘set’ was not declared in this scope
t_example_1.cpp: In member function ‘virtual void atfu_tc_snprintf_func::head()’:
t_example_1.cpp:27: error: ‘set’ was not declared in this scope

I'll probably be using just the shell bindings for my current project, but I'd like to be able to play with the C++ example. Any ideas how to fix it? Might it be better in the long run to include these examples in the distribution, so they don't go stale over time?

This is Mac OS X 10.5.4, with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465).

- Amitai

P.S. Please either include me in replies, or approve my subscription request. ;-)

Home | Main Index | Thread Index | Old Index