Hi,
I have some questions about gpi files: - What is a difference between file.gpi and file-all.gpi - Are they all necessary? - I set the gpc options --unit-destination-path and --unit-path to a specific directory (which does exists and have the right permissions) but gpi and objects file files are still created where the makefile is. Do I use wrong options? (I have many source files to compile and I don't want to clutter the application's root directory) I work with gpc 20050331 on SUN Solaris 2.6
Thanks
Pascal
Pascal Viandier wrote:
I have some questions about gpi files:
- What is a difference between file.gpi and file-all.gpi
The former contains the exported interface, the latter all the interface declarations. A module interface can export all or only some of the declarations (plus possibly some imported ones and possibly with renaming etc.), so it's not necessarily the same.
- Are they all necessary?
Yes, the former for imports, the latter is needed when the implementation of the module is compiled (which may be in a separate file). It must have direct access to all interface declarations, whether exported or not. Indeed, this was a known bug until we added the foo-all.gpi files.
- I set the gpc options --unit-destination-path and --unit-path to a
specific directory (which does exists and have the right permissions) but gpi and objects file files are still created where the makefile is. Do I use wrong options?
These options are used by automake and GP. If you compile your modules manually (or via an explicit Makefile) with `-c', you have to use `-o $UDP/foo.o --gpc-destination-path=$UDP' where $UDP is your intended directory and foo is the file name of the module. Unfortunately, it's not easy to change this for direct compiler invocations due to GCC's design. (Automake and GP do the same when invoking GPC [recursively], just hidden.)
Frank
Hello,
I just tried the option --gpc-destination-path=gpi and gpc1 produces the following error (two times): gpc1: error: unrecognized command line option "-fgpc-destination-path=gpi"
I use gpc 20050331, based on gcc-3.4.3.
Pascal
-----Message d'origine----- De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Frank Heckenbach Envoyé : June 3, 2005 17:44 À : gpc@gnu.de Objet : Re: Questions about GPI files and gpc
Pascal Viandier wrote:
I have some questions about gpi files:
- What is a difference between file.gpi and file-all.gpi
The former contains the exported interface, the latter all the interface declarations. A module interface can export all or only some of the declarations (plus possibly some imported ones and possibly with renaming etc.), so it's not necessarily the same.
- Are they all necessary?
Yes, the former for imports, the latter is needed when the implementation of the module is compiled (which may be in a separate file). It must have direct access to all interface declarations, whether exported or not. Indeed, this was a known bug until we added the foo-all.gpi files.
- I set the gpc options --unit-destination-path and --unit-path to a
specific directory (which does exists and have the right permissions) but gpi and objects file files are still created where the makefile is. Do I
use
wrong options?
These options are used by automake and GP. If you compile your modules manually (or via an explicit Makefile) with `-c', you have to use `-o $UDP/foo.o --gpc-destination-path=$UDP' where $UDP is your intended directory and foo is the file name of the module. Unfortunately, it's not easy to change this for direct compiler invocations due to GCC's design. (Automake and GP do the same when invoking GPC [recursively], just hidden.)
Frank
Pascal Viandier wrote:
I just tried the option --gpc-destination-path=gpi and gpc1 produces the following error (two times): gpc1: error: unrecognized command line option "-fgpc-destination-path=gpi"
Sorry, should have been --gpi-destination-path
Frank