2017-12-19 9 views
0

많이 파고 드디어 나는이 스레드 전체를 보았습니다. Does the .res file need to be in source control? 우리는 get git에서 결코 그것을 포함하지 않았습니다. 이제는 명령 줄에서 소스에서 프로젝트를 빌드하려고합니다. 볼랜드에서 파일을 열면 그 파일을 다시 만들 것을 요청할 것이고 프로젝트를 만들 수 있습니다. 내가 생성 된 모든 파일을 삭제하고 나는 다음과 같은 출력을 얻을 레이크 경우 (BRCC32.EXE 및 GRC32.exe에 초점) 나는 모든 명령 행 도구를 보았다은 .res borland 리소스 파일을 생성합니다.

$ bpr2mak_exe="#{ENV['BCB']}\\Bin\\bpr2mak.exe" 
$ make_exe="#{ENV['BCB']}\\Bin\\make.exe" 
$ puts `#{bpr2mak_exe} -omakefile MyProject.bpr` 
Loading project file 
Loading template 
Generating Makefile 
......................................... 

& puts `#{make_exe} -fmakefile` 
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland 
Fatal: 'MyProject.res' does not exist - don't know how to make it 

과의도 (루비 선명도에 대한 작업을 폭발) 그들은 내가 필요한 것처럼 보입니다. 또한 procmon을 사용하여 res 파일을 생성하기 위해 어떤 프로그램이 호출되는지 살펴 보았습니다. 따라서 볼랜드/엠바 카도 (Embarcado) 사람들이 파이프를 만들고 싶습니까?

$ "${BCB}\bin\BRC32.exe" -? 

Syntax: BRC32 [options ...] filename 
options marked with a '*' are on by default 

-r     compile only. Do not bind resources 
-fofilename   set output res filename 
-fefilename   set output exe filename 
-v     verbose 
-ipath    set include path 
-x     ignore INCLUDE environment variable 
-dname[=string]  define #define 
-32    * build 32-bit Windows compatible res/exe files 
-16     build 16-bit Windows compatible res/exe files 
-Vd.d Mark the .exe file with Windows version provided (4.0 is the default) 
-31 Provided for downward compatibility (build 16-bit res/exe files) 
-w32 Provided for downward compatibility (build 32-bit res/exe files) 
-k     do not create fastload area (16 bit only) 
-t     (ignored, for compatibility) 
-? or -h    display this message 

$ "${BCB}\bin\BRCC32.exe" -? 
Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Syntax: BRCC32 [options ...] filename 
options marked with a '*' are on by default 

@<filename>  Take instructions from command file 
-r     (ignored for compatibility) 
-16     Build 16-bit Windows compatible .res file 
-32     * Build 32-bit Windows compatible .res file 
-fofilename   Set output filename 
-v     Verbose 
-ipath    Set include path 
-dname[=string]  Define #define 
-x     Ignore INCLUDE environment variable 
-m     Enable multi-byte character support 
-cdddd    set default code page to nnnn 
-lxxxx    set default language to xxxx 
-31 Provided for downward compatibility (build 16-bit .res file) 
-w32 Provided for downward compatibility (build 16-bit .res file) 
-? or -h    Display this message 

(여기에 도움이된다면 명령 줄 도움말 화면입니다) 그냥 재미를 위해 나는 프로젝트 파일

$ "${BCB}\bin\BRC32.exe" -r MyProject.bpr 

Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Error MyProject.bpr 1 1: Expecting resource name or resource type name 

$ "${BCB}\bin\BRCC32.exe" -r MyProject.bpr 
Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Error MyProject.bpr 1 1: Expecting resource name or resource type name 

답변

1

IDE는하지 컴파일러에 대해이를 실행 시도, 기본 .res 파일을 생성 프로젝트 파일에서 추출한 버전 정보를 사용합니다. 명령 줄 컴파일을 시도 할 때 필요한 리소스 데이터 정의가있는 .rc 스크립트 파일을 만든 다음 brcc32을 사용하여 .res 파일로 컴파일 한 다음 ilink32으로 연결할 수 있습니다.

하지만, 실제로는 make을 사용하여 Borland 프로젝트를 컴파일해서는 안됩니다. Borland의 bcc32 컴파일러 또는 MS의 msbuild 프레임 워크 (C++ Builder 버전에 따라 다름)를 사용하고 make이 처리 할 모든 것을 처리하도록하십시오. 그런 다음 .bpr 또는 .cproj 파일을 .mak 파일로 먼저 변환하지 않고 컴파일 할 수 있습니다.

+0

내가 틀렸다면 정정 해주세요. 그러나 bpr2mak.exe를 사용하여 make 파일을 만드는 것이 좋았던 이유는 포함 된 새로운 클래스 (단위)를 선택했기 때문입니다. 여전히 bcc32 컴파일러 만 사용하여 처리 할 수 ​​있습니까? –

+1

유닛 참조는'.bpr' /'.cproj' 파일에 저장됩니다. bcc32는 실행될 때마다 파일을 구문 분석 할 때 파일을 선택합니다. 개별 파일이 아닌 프로젝트 자체를 컴파일하는 경우입니다. –