我在 Visual Studio 2008 中维护此解决方案,但我使用 bjam 构建我的可交付成果。该解决方案包括 3 个项目。jamfiles 设置为构建解决方案的 2 个版本(例如 A 和 B),然后为每个版本构建 32 位和 64 位可执行文件。
我的问题是 bjam 没有为解决方案中的一个项目找到 .h 文件,从而产生以下错误。这些 .h 文件在物理上位于“包含”文件夹中上下 2 个目录。
如果我将 .h 文件复制到项目的 jamfile 所在的位置,错误就会消失,并且解决方案会完美构建。但是,我们必须将 .h 文件保存在“include”文件夹中。
我的问题是,如何指示 bjam 在“include”文件夹中查找 .h 文件?下面是有问题的项目的 jamfile,以及我的 site-config.jam 文件
任何提示将不胜感激。谢谢。
-----------------------------------
ERROR:
compile-c-c++ Utilities\TemperatureLog\bin\msvc-9.0\small_x86\threading-multi\user-interface-gui\TemperatureLog.obj
TemperatureLog.cpp
c:\winirdir\build\winir\utilities\temperaturelog\TemperatureLogDlg.h(50) : error C2653: 'SBF' : is not a class or namespace name
c:\winirdir\build\winir\utilities\temperaturelog\TemperatureLogDlg.h(50) : error C2143: syntax error : missing ';' before '*'
c:\winirdir\build\winir\utilities\temperaturelog\TemperatureLogDlg.h(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\winirdir\build\winir\utilities\temperaturelog\TemperatureLogDlg.h(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
------------------------------------------
果酱文件:
project temperaturelog :
: requirements <define>_AFXDLL
<user-interface>gui
:
;
sources = [ glob *.cpp ] TemperatureLog.rc ;
exe TemperatureLog$(suffix) : $(sources)
/sbfsdk//SbfSdk$(suffix)
:
: small_x86
;
exe TemperatureLog$(suffix)_x64 : $(sources)
/sbfsdk//SbfSdk$(suffix)_x64
:
: small_x64
;
exe TemperatureLog$(suffix)_sap : $(sources)
/sbfsdk//SbfSdk$(suffix)_sap
:
: smallSapera_x86
;
exe TemperatureLog$(suffix)_sap_x64 : $(sources)
/sbfsdk//SbfSdk$(suffix)_sap_x64
:
: smallSapera_x64
;
install dist_x86 : TemperatureLog$(suffix) :
<variant>small_x86 : <location>$(installRoot_x86) ;
install dist_x64 : TemperatureLog$(suffix)_x64 :
<variant>small_x64 : <location>$(installRoot_x64) ;
install dist_sap_x86 : TemperatureLog$(suffix)_sap :
<variant>smallSapera_x86 : <location>$(installRoot_x86) ;
install dist_sap_x64 : TemperatureLog$(suffix)_sap_x64 :
<variant>smallSapera_x64 : <location>$(installRoot_x64) ;
--------------------------------
site-config.jam
project site-config ;
path-constant BoostRoot : C:/Boost/boost_1_44_0 ;
lib shlwapi : : <name>shlwapi ;
lib advapi32 : : <name>advapi32 ;
lib gdi32 : : <name>gdi32 ;
lib user32 : : <name>user32 ;
lib ole32 : : <name>ole32 ;
lib vfw32 : : <name>vfw32 ;
lib delayimp : : <name>delayimp ;
lib gdiplus : : <name>gdiplus ;
lib strmiids : : <name>strmiids ;
lib winmm : : <name>winmm ;
lib msvcrt : : <name>msvcrt ;
lib atls : : <name>atls ;
lib ksproxy : : <name>ksproxy ;
lib kernel32 : : <name>kernel32 ;
lib oleaut32 : : <name>oleaut32 ;
lib uuid : : <name>uuid ;
lib htmlhelp : : <name>htmlhelp ;
lib version : : <name>version ;
lib msi : : <name>msi ;
path-constant PleoraRoot : "C:/Program Files (x86)/Pleora Technologies Inc/iPORT Software" ;
lib cyutilslib_x86 : : <name>CyUtilsLib <search>$(PleoraRoot)/Libraries
:
: <include>$(PleoraRoot)/Includes
;
lib cyutilslib_x64 : : <name>CyUtilsLib64 <search>$(PleoraRoot)/Libraries
:
: <include>$(PleoraRoot)/Includes
;
path-constant PdvRoot : "C:/EDT/pdv" ;
lib pdvlib_x86 : : <name>pdvlib <search>$(PdvRoot)/lib/x86
:
: <include>$(PdvRoot)
;
lib pdvlib_x64 : : <name>pdvlib <search>$(PdvRoot)/lib/amd64
:
: <include>$(PdvRoot)
;
path-constant VceRoot : "C:/Program Files/Imperx/FrameLink Express/SDK" ;
lib vceclb_x86 : : <name>vceclb <search>$(VceRoot)/lib/win32
:
: <include>$(VceRoot)/inc
;
lib vceclb_x64 : : <name>vceclb <search>$(VceRoot)/lib/x64
:
: <include>$(VceRoot)/inc
;
path-constant DirectXRoot : "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" ;
lib d3dx9_x86 : : <name>d3dx9 <search>$(DirectXRoot)/Lib/x86
:
: <include>$(DirectXRoot)/Include
;
lib d3dx9_x64 : : <name>d3dx9 <search>$(DirectXRoot)/Lib/x64
:
: <include>$(DirectXRoot)/Include
;
lib d3d9_x86 : : <name>d3d9 <search>$(DirectXRoot)/Lib/x86
:
: <include>$(DirectXRoot)/Include
;
lib d3d9_x64 : : <name>d3d9 <search>$(DirectXRoot)/Lib/x64
:
: <include>$(DirectXRoot)/Include
;
path-constant IfcRoot : "C:/IFC510" ;
lib ifc21 : : <name>ifc21 <search>$(IfcRoot)/lib
:
: <include>$(IfcRoot)/include
;
path-constant PythonRoot : "C:/Required_Binaries/Python-2.7.1" ;
lib python_x86 : : <name>python27 <search>$(PythonRoot)/PCBuild
:
: <include>$(PythonRoot)/Include <include>$(PythonRoot)/PC
;
lib python_x64 : : <name>python27 <search>$(PythonRoot)/PCBuild/amd64
:
: <include>$(PythonRoot)/Include <include>$(PythonRoot)/PC
;
# path-constants work up to here, but not after this, so we use the full path. Why??
path-constant DirectShowRoot : "C:/Program Files/Microsoft SDKs/Windows/v7.0/Samples/multimedia/directshow/baseclasses" ;
lib Strmbase_x86 : : <name>strmbase <search>"C:/Program Files/Microsoft SDKs/Windows/v7.0/Samples/multimedia/directshow/baseclasses/Release_MBCS"
:
: <include>$(DirectShowRoot)
;
lib Strmbase_x64 : : <name>strmbase <search>"C:/Program Files/Microsoft SDKs/Windows/v7.0/Samples/multimedia/directshow/baseclasses/x64/Release_MBCS"
:
: <include>$(DirectShowRoot)
;
path-constant SaperaRoot : "C:/DALSA/Sapera" ;
lib SapClassBasic_x86 : : <name>SapClassBasic <search>"C:/Dalsa/Sapera/Lib/Win32"
:
: <include>$(SaperaRoot)/Classes/Basic <include>$(SaperaRoot)/Include
;
lib SapClassBasic_x64 : : <name>SapClassBasic <search>"C:/Dalsa/Sapera/Lib/Win64"
:
: <include>$(SaperaRoot)/Classes/Basic <include>$(SaperaRoot)/Include
;
path-constant SbfSdkInc : "C:\WinIRDir\build\WinIR\SbfSdk\include" ;
path-constant ActRoot : "C:/Program Files (x86)/Active Silicon/Phoenix/Win/SDK6.47" ;
lib ActiveSilicon_x86 : : <name>phxlw32 <search>$(ActRoot)/Lib/win32
:
: <include>$(ActRoot)/Include
;
lib ActiveSilicon_x64 : : <name>phxlx64 <search>$(ActRoot)/Lib/win64
:
: <include>$(ActRoot)/Include
;