[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

Post by Tom Wallic » Sat, 13 Nov 2004 07:49:01


Can this be done easily?

I am trying to develop some lookup services using the
boost graph library that will in turn use the new
PostgreSQL pqxx ANSI/ISO Standard C++ library to
access the PostgreSQL for UNIX RDBMS.


1. Can I use the same ACE Makefile structure?

Thus I will use

a) ACE Acceptor-Connector for the Distributed
Computing
b) Boost.org Boost Graph Library
c) PostgreSQL pqxx ANSI/ISO Standard C++ STL like
RDBMS Interface Library on Red Hat LINUX


Any sample Makefiles for when you want to 'mix'
external/third party development libraries with ACE?

I would appreciate some pointers/samples on how the
ACE Makefile structure can still be used as the
primary makefile plus incorporating the third party
libraries as mentioned.


Thank you for any assistance here.


Tom Wallick



__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
 
 
 

[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

Post by Xue Yong Z » Sat, 13 Nov 2004 08:16:33

I recommend you to read a few basic documents about using shared library
first, becuase I can see from your post that you do no have a
clear idea on Makefile, shared libary etc.

ACE, boost and stl are all provided as shared/static library,
and the purpose of Makefile is to tell the compiler how to
compile/link your source code, and link with the shared libraries.

I recommend you to try MPC to generate Makefile, instead of write
Makefile directly. MPC is very well documented by:
http://www.yqcomputer.com/

You .mpc file should look like this(you need to modify it to fit your
environment):

project : acelib {

includes += $(SRC_ROOT)/boost/include
libpaths += $(SRC_ROOT)/boost/lib

specific(borland, bmake, nmake, em3, vc6, vc7, vc71) {
//Libraries for Borland and Microsoft compilers are automatically
selected by boost itself.
macros += BOOST_GRAPH_DYN_LINK
}

specific(gnuace, make) {
lit_libs += boost_graph-gcc-mt-1_31
}

}

 
 
 

[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

Post by Steve Hust » Sat, 13 Nov 2004 08:17:00

Hi Tom,


Yes.


Yes. Just use the basic instructions from section 2.5 in APG, and use
add items to LIBS, LDFLAGS, and CCFLAGS as appropriate.


You're welcome.

Best regards,

-Steve
 
 
 

[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

Post by Marek Brud » Sun, 14 Nov 2004 01:08:23

Uytkownik Tom Wallick napisa:

Yes

Just use MPC, point in mpc::includes where boost header are placed,
modify mpc::libpath, add
in mpc::libs or mpc::lit_libs boost::graph library (I do no use graph
library, but if I remember
well it is plain library, not just set of headers).

However there are few subtle problems when using boost and ACE:
1. boost::unit_test_framework has its own startup procedure (main). To
use ACE classes in boost::utf one
has to call ACE_Init_ACE::init( ) in test suite initialization.
2. Under windows (nt,xp) when some boost::regex (and other) headers are
included before ace ones, one can obtain in
release variant (msvc71) an error "TryEnterCriticalSection is
undefined". This error is due to various definitions of __WINNT__
version macro, namely when ace headers are included before boost, then
__WINNT__ is 0x400, which is accepted by boost. But
when boost is included before ace, then it defines its own __WINNT__,
which turns off some section windows header, where
TryEnterCriticalSection is declared. In my company we solved this
problem by forcing __WINNT__ to 0x501 (Xp), which is
sufficient for us.
There are few other problems, but they can simply be overcome by proper
configuration of boost.

Marek Brudka
 
 
 

[ace-users] Has anyone mixed boost.org libraries with ACE using the standard ACE Makefile?

Post by Ossama Oth » Sun, 14 Nov 2004 02:14:57

Hi,



Please call ACE::init() instead. It is the documented way to initialize
ACE. The "ACE_Init_ACE" pseudo-namespace was only meant to be used
internally as an interim solution for code refactoring. In particular,
"ACE_Init_ACE" will not exist in the forthcoming x.4.3 beta. Here's the
relevant ChangeLog entry:

Fri Aug 13 23:26:56 2004 Ossama Othman < XXXX@XXXXX.COM >
...
* ace/ACE.h:
* ace/Flag_Manip.cpp:
* ace/Flag_Manip.h:
* ace/Flag_Manip.inl:
* ace/Handle_Ops.cpp:
* ace/Handle_Ops.h:
* ace/Init_ACE.cpp:
* ace/Init_ACE.h:
* ace/Lib_Find.cpp:
* ace/Lib_Find.h:
* ace/Sock_Connect.cpp:
* ace/Sock_Connect.h:

Functions that were in the pseudo "ACE" namespace are now in a
true "ACE" C++ namespace.
...


-Ossama