Boost logo

Boost-Build :

Subject: [Boost-build] Need help in a jamfile
From: Sherwood Hu (sherwood_at_[hidden])
Date: 2009-01-14 12:32:46


I am writing jamfile for a Windows COM server project. I followed the
directions in the URL
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Bui
ld_V2/MIDL_HOWTO, and the code looks like this:

 

mstypelib MyCOMServerProject-tlb

                :

                                MyCOMServerProject.idl

                ;

 

lib MyCOMServerProject :

                                MyCOMServerProject.rc surrogate.c

                                [ glob-tree *.cpp : .svn units ] :

                                <toolset>msvc:<define>_DEBUG

                                <link>shared

 
<implicit-dependency>MyCOMServerProject-tlb

                                <def-file>MyCOMServerProject.def

                                <variant>debug

                                <define>WIN32

                                <define>_WIN32_WINNT=0x0500

                                ;

 

 

 

After a couple of failures, the code finally worked. However, I have to
call bjam twice to get it work. The first build ended up with an error:

 

 MyCOMServerProject.rc(106) : error RC2135 : file not found:
MyCOMServerProject-tlb.tlb

 

The problem is that .rc is built before .tlb, so the rc compiler
complained that it could not locate .tlb file.

 

If I run the same command the second time, the problem did not exist
because the .tlb file was generated.

 

Is there any workaround to this - to force that mstypbelib is called
before .res file is built?

 

Thanks!

Sherwood



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