2013-02-14 5 views
3

부스트 파일 시스템 라이브러리를 사용하고 싶습니다. CodeBolcks를 사용하여 Windows에서 개발하고 있습니다. "Windows 시작하기"를 따르고 있습니다. http://www.boost.org/doc/libs/1_53_0/more/getting_started/windows.html#install-boost-build. I 만든 다음 :부스트 : 부트 스트랩 .bat 컴파일 bjam 빌드 실패

D:\boost_1_53_0\tools\build\v2>bootstrap.bat gcc 
Bootstrapping the build engine 

Failed to bootstrap the build engine 
Please consult bootstrap.log for furter diagnostics. 

로그 파일에 포함 :

### 
### Using 'gcc' toolset. 
### 

D:\boost_1_53_0\tools\build\v2\engine>if exist bootstrap rd /S /Q bootstrap 

D:\boost_1_53_0\tools\build\v2\engine>md bootstrap 

D:\boost_1_53_0\tools\build\v2\engine>gcc -DNT -o bootstrap\jam0.exe command.c compile.c constants.c debug.c execnt.c filent.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 

D:\boost_1_53_0\tools\build\v2\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= " clean 
...found 1 target... 
...updating 1 target... 
...updated 1 target... 

D:\boost_1_53_0\tools\build\v2\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= " 
...found 50 targets... 
...updating 2 targets... 
[COMPILE] bin.ntx86\b2.exe 

"gcc" -o bin.ntx86\b2.exe "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DNT" "-DYYSTACKSIZE=5000" "-pedantic" "-fno-strict-aliasing" "-s" "-O3" "-Wno-long-long" "command.c" "compile.c" "constants.c" "debug.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "pwd.c" "class.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execnt.c" "filent.c" "pathunix.c" 

...failed [COMPILE] bin.ntx86\b2.exe... 
...removing bin.ntx86\b2.exe 
...skipped bjam.exe for lack of b2.exe... 
...failed updating 1 target... 
...skipped 1 target... 
I이 실행) boost_1_53_0

2 \

1) I는 다운로드에 부스트 추출 : d를

우리가 보았 듯이, 컴파일은 실패합니다. 나는 이유를 모른다. 어떻게 부스트 라이브러리를 성공적으로 설치합니까?

참고 : "GCC --version은"

감사합니다 GCC의 버전을 반환합니다.

EDIT : 나 가이드의 다음 단계에서 이동

"gcc" -o bin.ntx86\b2.exe "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DNT" "-DYYSTACKSIZE=5000" "-pedantic" "-fno-strict-aliasing" "-s" "-O3" "-Wno-long-long" "command.c" "compile.c" "constants.c" "debug.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "pwd.c" "class.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execnt.c" "filent.c" "pathunix.c" 

을 실행함으로써, b2.exe을 만들 수 있었다. 자, 인수 오류가 발생했습니다. 어떻게 생각해? 파일 시스템을 사용하려면

D:\boost_1_53_0\tools\build\v2\engine\bin.ntx86>b2 --toolset=gcc "--prefix=D:\Program Files\CodeBlocks" install 

notice: could not find main target install 
notice: assuming it is a name of file to create. 
D:/boost_1_53_0/tools/build/v2/build\project.jam:753: in attribute 
warning: rulename $($(project).attributes).get expands to empty string 
D:/boost_1_53_0/tools/build/v2/build\project.jam:765: in project.target 
D:/boost_1_53_0/tools/build/v2\build-system.jam:708: in load 
D:\boost_1_53_0\tools\build\v2\kernel\modules.jam:283: in import 
D:\boost_1_53_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build 
D:\boost_1_53_0\tools\build\v2\boost-build.jam:8: in module scope 
D:/boost_1_53_0/tools/build/v2/build\project.jam:753: in project.attribute 
warning: rulename $($(project).attributes).get expands to empty string 
D:/boost_1_53_0/tools/build/v2/build\targets.jam:206: in object(project-target)@ 
45.__init__ 
D:/boost_1_53_0/tools/build/v2/kernel\class.jam:88: in new 
D:/boost_1_53_0/tools/build/v2/build\project.jam:765: in project.target 
D:/boost_1_53_0/tools/build/v2\build-system.jam:708: in load 
D:\boost_1_53_0\tools\build\v2\kernel\modules.jam:283: in import 
D:\boost_1_53_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build 
D:\boost_1_53_0\tools\build\v2\boost-build.jam:8: in module scope 
D:/boost_1_53_0/tools/build/v2/build\project.jam:753: in project.attribute 
warning: rulename $($(project).attributes).get expands to empty string 
D:/boost_1_53_0/tools/build/v2/build\targets.jam:226: in object(project-target)@45.get 
D:/boost_1_53_0/tools/build/v2\build-system.jam:721: in load 
D:\boost_1_53_0\tools\build\v2\kernel\modules.jam:283: in import 
D:\boost_1_53_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build 
D:\boost_1_53_0\tools\build\v2\boost-build.jam:8: in module scope 
D:/boost_1_53_0/tools/build/v2\build-system.jam:722: in load 
*** argument error 
* rule project.load (jamfile-location) 
* called with: () 
* missing argument jamfile-location 
D:/boost_1_53_0/tools/build/v2/build\project.jam:53:see definition of rule 'project.load' being called 
D:\boost_1_53_0\tools\build\v2\kernel\modules.jam:283: in import 
D:\boost_1_53_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build 
D:\boost_1_53_0\tools\build\v2\boost-build.jam:8: in module scope 
+0

실행 명령 줄에서 컴파일 명령, 무엇을보고 오류입니다. 내가 포함 된 것이 보이지 않는다. 그것은 문제일지도 모른다. –

+0

@ Jason 댓글 주셔서 감사합니다. 그러나 귀하의 요청을 정말로 이해하고 있는지 확신 할 수 없습니다. 어떻게 커맨드 라인에서 컴파일을 실행하려면? 제발 내 작은 지식을 용서해주십시오 –

+0

@farm 명령 줄 창을 열고 디렉터리를'D : \ boost_1_53_0 \ tools \ build \ v2 \ engine'으로 변경 한 다음 출력 로그에있는 명령을 실행하십시오. ""gcc " o bin.ntx86 \ b2.exe "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOP ..."(이 주석에서 복사하기에는 너무 길음) – us2012

답변

4

, 나는 다른 컴퓨터를 사용하고, 다음 단계를 수행, 그것은 일 :

1) Installed MinGW and added this enviroment variable => C:\MinGW\bin 
2) Expanded boost_1_53_0 to c:\ 
3) cd c:\boost_1_53_0\tools\build\v2 
4) bootstrap.bat gcc 
5) b2 install --prefix="C:\Boostbuild" --toolset=gcc 
6) Added this enviroment variable => C:\Boostbuild\bin 
7) cd c:\boost_1_53_0 
8) b2 --build-dir="C:\Boostbuild" toolset=gcc --build-type=complete stage 
9) Installed CodeBlocks without MinGW 
CodeBlocks: 
10) Settings->Global variables: current variable => boost, Base => C:\boost_1_53_0, include => C:\boost_1_53_0\stage\lib 
11) Create a new C++ console project, and right click on it: 
Build Options->Choose Project Name on the left -> search directories 
On compiler tab, press Add and type: $(#boost) 
On linker tab, press Add and type: $(#boost.lib) 
12) Right click on the C++ console project: 
Build Options->Choose Project Name on the left -> linker settings 
Add the following link libraries: 
..\..\boost_1_53_0\stage\lib\libboost_filesystem-mgw46-mt-1_53.a 
..\..\boost_1_53_0\stage\lib\libboost_system-mgw46-mt-1_53.a 

감사합니다 모두가