简体   繁体   English

C ++ Builder(XE7)编译时没有链接?

[英]C++ Builder (XE7) compile without linking?

Is it possible - only compile/make source in C++ Builder (XE7) without the long delay of linking? 是否可以-仅在C ++ Builder(XE7)中编译/生成源代码,而无需长时间延迟链接? If yes, is there a shortcut key for it? 如果是,是否有快捷键?

It would be very useful when I just want to check if my code compiles at a point, but don't want to execute it. 当我只想检查我的代码是否在某个时刻编译而又不想执行它时,这将非常有用。

mauroaraujo is right - since BCB4 or thereabouts the Project menu has an item that is misleadingly labelled 'Build ' + current source file . mauroaraujo是对的-因为BCB4或之前的项目菜单中有一个被误导地标记为“构建” +当前源文件的项目 This compiles the current .cpp file (compiler switch -c). 将编译当前的.cpp文件(编译器开关-c)。 The item description in the documentation is a bit misleading as well. 文档中的项目描述也有些误导。

The standard keyboard shortcut is Alt + F9 - the same as it always has been ever since the times of Turbo C/C++ (with the possible exception of some early C++Builder incarnations). 标准的键盘快捷键是Alt + F9-与自Turbo C / C ++时代以来一直一样(除了某些早期的C ++ Builder变体)。 The shortcut might change or disappear when certain editor key mappings are selected, though. 但是,当选择了某些编辑器键映射时,快捷方式可能会更改或消失。

There seems to be no direct equivalent to 'Syntax check' item that becomes available in the Project menu when the current source is a .pas file, but for most practical purposes it should be close enough. 当前源为.pas文件时,似乎没有与“语法检查”项直接等效的项目菜单中的“语法检查”项,但对于大多数实际用途,它应该足够接近。

What the IDE doesn't seem to have is a command for compiling all sources without linking (sort of like a 'syntax check all sources'). IDE似乎没有的是一个无需链接即可编译所有源代码的命令(有点像“语法检查所有源代码”)。 However, you may be able to build a custom target where the link phase is configured to do nothing. 但是,您可以在链接阶段配置为不执行任何操作的情况下,构建自定义目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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