Peter N Lewis wrote:
Pascal Viandier wrote:
First: There are some objects from c sources not found at link time. I put {$L my_c_extern.c} in a Pascal source but gp says "my_c_extern.c must be compiled" and stops instead of compiling it (I think since is knows that the source must be compiled, it should do it, no?). Then I tried {$L my_c_extern.o} instead and gp says " My_c_extern.c:999: undefined reference to 'symbol' where 'symbol' is defined in a third party library for which I put a -l directive on gp command-line.
I believe this is due to a bug I fixed in my copy of gp. It stems from the comment:
{ Just make sure the file is added to Deps. We don't need any dependency relations because files linked with linker directives can be compiled at any time. }
which I believe is erroneous. A patch (based on my subversion history) is attached below, but I do not know if it interacts with any of the other patches I've done.
<snip> Also, I noticed that objects are written in the same directory as gpi files despite the option --object-destination-path=obj on the gp command-line.
I can't help you much with that, as I don't use it. But for {$L}, gp stores a gpd file, so it would need to go somewhere.
gp patch follows. This is definitely not any sort of official patch. My gp has wandered far from the track.
I ran into the same problem this morning but Peter's patch, applied by hand to gp-0.61, solved the problem.
Regards,
Adriaan van Os