How do I change the destination directory of .hpp files?

By: Vincent Drake

Abstract: The directories/conditionals section of project options do not affect the output of .hpp files. Editing the project option source solves this problem.

Question:

How can I change the output directory for .HPP files? The 'intermediate files' directory has no effect.

Answer:

HPP files are C++ header files providing a C++ interface to compiled object pascal code. The Delphi compiler, DCC32.EXE generates these files when it compiles .PAS files in C++Builder. By default, the .HPP files are deposited in the same directory as the .PAS it is derived from.

This setting can be changed by adding a flag to the command line parameters sent to DCC32.

Try this:

Click Project | Edit Option Source . This will open your project's XML source. Find (F3) the element named PFLAGS. The value attribute contains the command line parameters being passed to DCC32 when you compile your project. Add to the end of these parameters -Epath where path is the directory you want the .HPP files to be located. Save the project to commit the settings.

Example:

<PFLAGS value="-N2..\obj -N0..\obj -$YD -$W -$O- -v -JPHNE -M -E..\include"/>

HPP files will be sent to the 'include' directory one directory level up from the project directory.


Published on: 1/11/2001 12:00:00 AM

Server Response from: ETNASC04

Copyright© 1994 - 2013 Embarcadero Technologies, Inc. All rights reserved.