Main BLOGGER
Google
WWW THIS BLOG
Tuesday, February 22, 2005
 
C++ reflection Day Two
1. set up things in ~/ken/C++Reflection directory
2. gccxml is installed in ~/usr/bin and runs successfully
3. generated the shared library for reflection successfully
in --/reflection/src/xct/reflection
$CC -o ArrayType.o -c ArrayType.cpp -I../..
$CC -o ClassType.o -c ClassType.cpp -I../..
$CC -o FundamentalType.o -c FundamentalType.cpp -I../..
$CC -o PointerType.o -c PointerType.cpp -I../..
$CC -o PtrHolder.o -c PtrHolder.cpp -I../..
$CC -o Type.o -c Type.cpp -I../..
$CC -o check.o -c check.cpp -I../..
$CC -shared -W1,-soname,libfoo.so -o libfoo.so ArrayType.o ClassType.o FundamentalType.o PointerType.o PtrHolder.o Type.o check.o
4. generated testing program successfully
in --/reflection/src/tests
$CC -o A_reflection.o -c A_reflection.cpp -I..
$CC -o B_reflection.o -c B_reflection.cpp -I..
$CC -o C_reflection.o -c C_reflection.cpp -I..
$CC -o B.o -c B.cpp -I..
$CC main.cpp -I.. -L../xct/reflection -lfoo A_reflection.o B_reflection.o C_reflection.o B.o
5. testing ok
mustang:~/ken/C++Reflection/reflection/src/tests> ./a.out
A::name: A
B::name: B
123987
98777
name: 1B
type name: 1B
B
type name: 1B
B
array class name: Pf, Pf



<< Home

Powered by Blogger

Google
WWW THIS BLOG