How do I compile ACE on Ubuntu 9.10.
What environment variables do I need to set?
views:
230answers:
4I am familiar with the ace docmentation, but it states that I need to download and build ace. I have installed libace-dev via synaptic in Ubuntu 9.10, and am a bit uncertain what is given to me and what is not.
I haven't tested, but that package seems to include all the necessary header files and the shared library. You should not have to build anything yourself. Have you tried using the library yet?
Yes I have. I tried to compile this example
http://huihoo.org/ace_tao/ACE-5.2+TAO-1.2/ACE_wrappers/docs/tutorials/Chap_5/ex03.html
./usr/lib/libACE.so
$echo $PATH /usr/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
...so I guess it's just to compile like this?
$g++ exc3.cpp -o exc3
...how ever:
In file included from /usr/include/ace/config-lite.h:24, from /usr/include/ace/config-all.h:20, from /usr/include/ace/Synch_Traits.h:19, from /usr/include/ace/Timer_Queue.h:19, from timeout.cpp:11: /usr/include/ace/config-macros.h:500: error: expected constructor, destructor, or type conversion before ‘typedef’ /usr/include/ace/config-macros.h:501: error: ‘ACE_HANDLE’ does not name a type In file included from /usr/include/ace/os_include/os_limits.h:27, from /usr/include/ace/Basic_Types.h:58, from /usr/include/ace/OS_NS_Thread.h:29, from /usr/include/ace/Guard_T.h:26, from /usr/include/ace/Free_List.cpp:7, from /usr/include/ace/Free_List.h:142, from /usr/include/ace/Timer_Queue_T.h:19, from /usr/include/ace/Timer_Queue.h:26, from timeout.cpp:11: /usr/include/ace/os_include/os_unistd.h:178: error: ‘ACE_HANDLE’ was not declared in this scope /usr/include/ace/os_include/os_unistd.h:179: error: expected primary-expression before ‘char’ /usr/include/ace/os_include/os_unistd.h:180: error: expected primary-expression before ‘n’ /usr/include/ace/os_include/os_unistd.h:181: error: expected primary-expression before ‘struct’ /usr/include/ace/os_include/os_unistd.h:181: error: initializer expression list treated as compound expression /usr/include/ace/os_include/os_unistd.h:183: error: ‘ACE_HANDLE’ was not declared in this scope /usr/include/ace/os_include/os_unistd.h:184: error: expected primary-expression before ‘const’ /usr/include/ace/os_include/os_unistd.h:185: error: expected primary-expression before ‘n’ /usr/include/ace/os_include/os_unistd.h:186: error: expected primary-expression before ‘struct’ /usr/include/ace/os_include/os_unistd.h:186: error: initializer expression list treated as compound expression . . .
and so it goes on...
I have not had the time to look into this further.