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.Build_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