Show quoted text 9 lines
On 03/10/2008, Mattias Gaertner wrote:
>> the unit dir as /path/to/compiledunits/$(TargetCPU)-$(TargetOS),
>
> The macros are normal. But this looks like an absolute path. Maybe
> you meant compiledunits/$(TargetCPU)-$(TargetOS), relative to your
> package?
it is absolute, but it's the right dir (and the compilation works, for
both archs).
I doubt, that this is portable. How do you want to compile that on your next/other computer?
Show quoted text 8 lines
>> and i
>> specify the path to all the source so the ide can find it for
>> completion, etc.
>
> What do you mean with specify?
i add all source paths to the "Other Sources (used only by IDE not
compiler)".
Ok.
Note: The recommended way is to add the files to your package. Then the IDE will setup the paths automatically. And it can warn you about common misconfigurations.
Show quoted text 8 lines
> In lazarus you use packages to specify paths. You hardly write paths
> yourself in the edit/combo boxes of the IDE.
the package in question (fpgui) doesn't play well when i cross
compile. it compiles the whole package every time i switch compiler
(i386 to arm), which is annoying. doing it this way it will find the
compiled fpgui units for whichever arch, and just compile my project.
this works well, so no problems there.
Apparently there is a problem, because switching targets should not compile everything everytime.
The IDE compiles everything (-B switch), when something changed compared to the data in the .compiled file of the output directory. If you have one output directory for each target, then you have one .compiled file per target and thus switching between targets should not add the -B switch. Please backup a .compiled file, switch back and forth and compile again. Compare the new .compiled file with the backup. What difference do you see?
Show quoted text 11 lines
> You can see the search paths via source editor / popup menu / file
> settings / unit info. The 'unit path' is given to the compiler, the
> 'source path' is an addition for the IDE. Both are normally defined
> by the compiler options.
i've had a look at this "unit info" and all the paths are there and
correct.
as i've said, it does find some of the units i ctrl-click on. but it
seems random and i _think_ it only finds source in the same directory
as the file i'm clicking on.
Sending me an example project would help to solve the mystery. But with your absolute path names it will probably not work here anyway.
What OS and what FPC version are you using?
Mattias