简体   繁体   中英

C++ Builder (XE7) compile without linking?

Is it possible - only compile/make source in C++ Builder (XE7) without the long delay of linking? 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 . This compiles the current .cpp file (compiler switch -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). 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.

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'). However, you may be able to build a custom target where the link phase is configured to do nothing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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