简体   繁体   中英

The boost-build can't correctly locate .tli file and aborts

I'm trying to build a dll, which uses excel automation object, using boost-build.

It has one only .cpp file which includes mso.tlh, vbe6ext.tlh and excel.tlh files(the appropriate .tli files are present too). All files are in one directory with the jamfile.

In the Jamfile the "< include>./" is specified. However when I try to build it interrupts because it is looking for excel.tli file in a directory where Jamroot file is, not where jamfile and excel.tli file are.

If I put excel.tli where Jamroot is, the build is successfull.

What should I do to make it look for excel.tli file in a directory where Jamfile is?

If header files are right alongside the source file there is no need to put it in the search path. Just make sure that source file includes them using quotes, not angle brackets, ie

#include "excel.tlh"
#include "mso.tlh"
#include "vbe6ext.tlh"

Alternatively, you can provide correct search path using path-constant rule. Add the following in your jamfile:

path-constant HERE : . ;

And now you can use $(HERE) as a reference to the jamfile directory

exe my_exe : ... : <include>$(HERE) ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM