Grant Jacobs wrote:
At 1:22 PM +0100 3/3/03, Frank Heckenbach wrote:
Grant Jacobs wrote:
- The compiler won't make .o files for units that are found in a
directory other than the one you're compiling from.
I have three directories and I compile from within one of them. The units in the other two directories are located using --unit-path compiler option. Reading the docs, I'm under the impression its supposed to default to placing the .o files into the directory you compile from for all units,
Yes, I think that's how it should be (and seems to be in my test).
regardless where the units are located unless you play with the compiler options. The .gpi files *are* made correctly. (I'm using --autobuild, btw.)
Sorry, but your description is not really clear to me. Are no .o files created, or in which directories are they created, and what about the gpi files? Which compiler options did you use, and which files are located where?
No .o files are made for nits which lie outside the current directory. You have to do them yourself manually, which in my case is simply a matter of 'gpc -c ../otherdir/*.p'. However, its not what I expected. I thought the compiler would locate them via --unit-path which I use on the command line, etc.
alias gpc="gpc --executable-file-name --nested-comments --unit-path='~sysadmin/work/code/LMBCodeArchive/GNUPascal/GHJLibraries:~sysadmin/work/code/LMBCodeArchive/GNUPascal/table_code_dir:.' --autobuild"
(Excuse the wraparound.) I compile from ~/sysadmin/work/code/LMBCodeArchive/GNUPascal/aa_prog_dir
The units in GHJLibraries and table_code_dir have their .gpi files made into aa_prog_dir as expected; but no .o files are made for these units. .o files are made for all the units in aa_prog_dir, but not the other two directories.
I can work around it, but it might be worth noting as something that might be tackled "one day".
If really no object files are generated, this would be a rather serious bug.
Can you send me the output of a full (i.e., `--autobuild', or after removing all .gpi files) compilation with `-v' (verbose), with a preferably simple example that exhibits this bug?
BTW, if your shell behaves like Unix shells, then the above alias is probably wrong, because `~' within single quotes is not expanded, i.e. it would look for a directory actually called `~sysadmin' (rather than the home of user `sysadmin'). But I don't suppose that's the problem here since apparently the units are found.
Frank