[英]Run Borland turbo c++ 10 IDE project from command line
I'm trying to integrate a legacy borland turbo c++ project into jenkins task and I need to be able to compile the project from command line. 我正在尝试将遗留的borland turbo c ++项目集成到jenkins任务中,我需要能够从命令行编译项目。
Is there any way to get the compiler CLI information from the project so that I could make a batch file that compiles it? 有没有办法从项目中获取编译器CLI信息,以便我可以创建一个编译它的批处理文件?
SO: Windows 7 所以:Windows 7
You can get the commands being invoked by C++ Builder by exporting a makefile for the project. 您可以通过导出项目的makefile来获取C ++ Builder调用的命令。
Run the makefile with borland's make.exe
tool: 使用borland的
make.exe
工具运行makefile:
make -B -K -n -f" projectMakefileGoesHere "
make -B -K -n -f“ projectMakefileGoesHere ”
-B
will traverse all the dependencies ignoring age. -B
将遍历忽略年龄的所有依赖项。 -K
will keep any temp response files used during the build. -K
将保留构建期间使用的任何临时响应文件。 -n
do a dry-run printing the commands that would've been called in an actual build. -n
执行干运行打印在实际构建中调用的命令。 The link commands will be in the MAKE0xxx.@@@
response file where " x " is a number assigned by make. 链接命令将在
MAKE0xxx.@@@
响应文件中,其中“ x ”是由make分配的编号。
For later versions of C++ Builder, the .cbproj
project is actually a msbuild project file. 对于C ++ Builder的更高版本,
.cbproj
项目实际上是一个msbuild项目文件。 You can use msbuild to print the build commands used for the project. 您可以使用msbuild打印用于项目的构建命令。 eg.
例如。
msbuild " project.cbproj " -p:Configuration=Debug -clp:ShowCommandLine -v:n
msbuild “ project.cbproj ”-p:Configuration = Debug -clp:ShowCommandLine -v:n
Unfortunately, msbuild doesn't have a dry-run option so it'll end up building the project. 不幸的是,msbuild没有干运行选项,所以它最终会构建项目。 Another idea is to create a simple logging program that replaces
bcc32.exe
compiler and ilink32.exe
linker. 另一个想法是创建一个简单的日志记录程序,替换
bcc32.exe
编译器和ilink32.exe
链接器。 With this, you can see exactly what options and switches are being passed to the tools. 有了这个,您可以准确地看到传递给工具的选项和开关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.