1

I am trying to install GLscene but getting problems with the source file locations.

It says in the install instructions to add the GLscene source directories into the global library path in tool/options/Delphi options/Library, which I have done but it has no effect.

I can add the source directories into each package project directory and it then compiles, but I would rather have it accessible globally.

The GLscene library items I have entered are,

C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source

C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source\Shaders

C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source\DesignTime

Which are all correct,

anybody know any reason why the compiler can't find the files in these directories?

Andy k
  • 1,056
  • 1
  • 11
  • 22
  • Make sure that you select the correct compiler target when entering the library paths. Each compiler target has its own library paths. – Uwe Raabe Dec 28 '15 at 22:39
  • Yes, I entered the same paths in both 32 and 64 bit platforms. – Andy k Dec 28 '15 at 23:53
  • What is the exact error message from the compiler? – Wodzu Dec 29 '15 at 07:05
  • @DavidHeffernan, the compiler searches first in the project search paths and then in the library paths. The relevant entry can be found in CodeGear.Delphi.Targets (look for UnitSearchPath). If it finds a source file it will compile it, otherwise it will look for a precompiled DCU. That behavior is independent of project search path or library path. – Uwe Raabe Dec 29 '15 at 09:20
  • @Uwe For some reason I thought library path was for compiled files only. I was wrong. – David Heffernan Dec 29 '15 at 09:33
  • The Library path was probably INTENDED for Library files (folders containing release mode DCUs) but in actual usage people seem to fill it with Source folders. – Warren P Dec 29 '15 at 12:02

2 Answers2

3

The compiler will search for source files on the library path. Note that there are separate library paths for different targets, e.g. Win32, Win64 etc.

If you have source files that cannot be found, then they are not in the library path that you specified.

Personally I don't like the approach of using search paths for source files. I like everything under my project directory so that I can check out from my VCS and have everything I need to build right there. A search path based approach makes serious development very difficult because you cannot maintain branches. What if you have old versions to maintain that use old versions of your libraries?

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • I have accepted this as the answer. The sample programs that come with GLscene works with the global library path set. The main GLscene code still refuses to compile with the file paths set in the library options. I have no idea why this is but being as they only need to be done once, I can live with setting these up in their own project search paths ( even though their is a ton of them). – Andy k Dec 29 '15 at 16:29
0

Well this is a bit late but it could help someone else.

Try and add the paths to both the Library Path and the Debug DCU Path.

Recent Delphi versions have different build configurations for Release and Debug and my guess is that the Debug configuration only searches in the Debug DCU Path.

Martin
  • 39
  • 1
  • 5