How can I tell the Compiler, that the source of an unit is at the same place as the main-source, when I invoke it from somewhere else?
Hello, can anyone please help me with the following: I 've got a Directory, where there is the sourcecode which shall be compiled, and where the executable has to go. But I have to invoke gpc from a different directory. This works fine... i am doing it this way: /usr/local/bin/gpc -s --automake /home/michael/WebAssign/data/1612/compile/testeSchlange.pas -o /home/michael/WebAssign/data/1612/compile/executable This compiles "testeSchlange.pas" and produces a file named "executable" in the directory /home/michael/WebAssign/data/1612/compile/ But now I want to use an unit, which is not precompiled. The sourcecode of the unit is in the same directory as the sourcecode of the main-program. If I do the same as in the first case, the unit is not found. So tried it like this: /usr/local/bin/gpc -s --automake --unit-path /home/michael/WebAssign/data/1612/compile/ /home/michael/WebAssign/data/1612/compile/testeSchlange.pas -o /home/michael/WebAssign/data/1612/compile/executable But this does not work, too. So, can anyone give me the right syntax? What is the difference between --unit-path and --object-path? Greetings, Michael Paap
michael paap wrote:
Hello,
can anyone please help me with the following:
I 've got a Directory, where there is the sourcecode which shall be compiled, and where the executable has to go. But I have to invoke gpc from a different directory. This works fine... i am doing it this way:
/usr/local/bin/gpc -s --automake /home/michael/WebAssign/data/1612/compile/testeSchlange.pas -o /home/michael/WebAssign/data/1612/compile/executable
This compiles "testeSchlange.pas" and produces a file named "executable" in the directory /home/michael/WebAssign/data/1612/compile/
But now I want to use an unit, which is not precompiled. The sourcecode of the unit is in the same directory as the sourcecode of the main-program.
If I do the same as in the first case, the unit is not found. So tried it like this:
/usr/local/bin/gpc -s --automake --unit-path
--unit-path=/your/path/here
So, can anyone give me the right syntax? What is the difference between --unit-path and --object-path?
--object-path only applies to C files etc., --unit-files to both (I don't see a reason to use --object-path at all normally.) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/ GPC To-Do list, latest features, fixed bugs: http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
participants (2)
-
Frank Heckenbach -
michael paap