From: Andrei Melnikov (andy.melnikov_at_[hidden])
Date: 2006-06-13 02:06:23
I'm trying to use use Comet library and Boost.Build in my project.
Comet (http://lambdasoft.dk/comet) is language binding between COM and
C++. It allows you to do both COM client and COM server programming,
without any dependency on either ATL or MFC. In other words Comet is a
replacement for ATL.
Comet uses its own tlb2h.exe tool to generate C++ headers from type
libraries instead of relying on headers generated by MIDL compiler or
by #import directives.
The following source files are required to build a simple Automation server dll:
Build process is the following:
1) idl compiler produces minicomet.tlb from minicomet.idl
2) tlb2h produces ARMO.h from minicomet.tlb
3) c++ compiler produces minicomet.obj from minicomet.cpp, minicomet.h
and different comet, Platform SDK and C Runtime headers.
4) resource compiler produces minicomet.res from minicomet.rc and minicomet.tlb
5) linker produces minicomet.dll from minicomet.res, minicomet.obj,
minicomet.def, C Runtime library and various PSDK libraries.
Here's the best Jamroot I could achieve:
project : default-build <debug-symbols>on <optimization>off ;
tlb2h -h- $(>:W) -o $(<:D) -r $(<:B)
make ARMO.h : minicomet.tlb : comet-tlb2h ;
mstypelib minicomet.tlb : minicomet.idl ;
But it has several flaws.
1) If I omit "<include>bin/msvc-8.0/release", the generated ARMO.h
won't be found by C++ compiler
2) minicomet.tlb is an intermediate build product. So, theoretically,
it's redundant, and we should be able to say just
make ARMO.h : minicomet.idl : comet-tlb2h ;
3) There are two ways to make headers out of idl files:
* midl + idl2h
There should be a way to tell explicitly how ARMO.h should be built to
avoid generator conflicts.
Now midl compiler always produces its own header due to hardcoded
command line options in midl.jam. This should be customizable.
I hope that someone will be able to help with
"<include>bin/msvc-8.0/release". The rest issues aren't that important
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk