tags:

views:

1347

answers:

4

I'm using the command line compiler for builds. One problem I see is that the paths mentioned there seem to need to be the short versions of the filenames such that they don't contain any spaces. I don't know so much about this even though I have used it for some time.

I recently upgraded to d2009 and the problem started then.

Is there a way around shortening the path?

I should say I'm not eager to change to use the MS Build tool at this time. I just want to build an old copy of my app & get back to other work.

Here's the path used in the dcc32.cfg file for the -I, -U, -O, and -R parameters:

$(BDS)\LIB;$(BDS)\Imports;$(BDS)\Lib\Indy10;C:\PROGRA~1\Borland\BDS\4.0\RAVERE~1\Lib;c:\prj\lib\lib2002;C:\DOCUME~1\ALLUSE~1\DOCUME~1\RADSTU~1\5.0\Bpl;c:\DOCUME~1\mike\MYDOCU~1\BORLAN~1\bpl;C:\Prj\Lib\LOCKBO~1\source;C:\Prj\Lib\MyComp;C:\Prj\Lib\ABBREV~1\source;C:\Prj\Lib\ZLib;C:\Prj\Lib\MinMod;C:\Prj\Lib\HELPMA~1;C:\Prj\Lib\DXGETT~1;c:\windows\system32;c:\prj\lib\xpburn;C:\Prj\Lib\WININE~1;C:\Prj\Lib\regexpr\Source;C:\Prj\Lib\VCARDR~1;C:\PROGRA~1\Raize\RC4\Lib\BDS2006;C:\Prj\Lib\jcl\lib\d10;C:\Prj\Lib\jcl\source;C:\Prj\Lib\jvcl\lib\D10;C:\Prj\Lib\jvcl\common;C:\Prj\Lib\jvcl\RESOUR~1;C:\Prj\Lib\ProE6\Delphi;C:\Prj\Lib\FastMM4;C:\Prj\Lib\OPENOF~1;C:\Prj\Lib\DEVELO~1\Library\Delphi11;C:\Prj\Lib\DEVELO~1\EX38D9~1\Sources;C:\Prj\Lib\DEVELO~1\EXBD88~1\Sources;C:\Prj\Lib\DEVELO~1\XPTHEM~1\Sources;C:\Prj\Lib\DEVELO~1\EX2EBC~1\Sources;C:\Prj\Lib\DEVELO~1\EXC5FB~1\Sources;C:\Prj\Lib\DEVELO~1\EX7C7C~1\Sources;C:\Prj\Lib\DEVELO~1\EXPRES~3\Sources;C:\Prj\Lib\DEVELO~1\EXPRES~4\Sources;C:\Prj\Lib\DEVELO~1\EXC73B~1\Sources;C:\Prj\Lib\DEVELO~1\EX7165~1\Sources;C:\Prj\Lib\DEVELO~1\EXPRES~2\Sources;C:\Prj\Lib\DEVELO~1\EXPRES~1\Sources;C:\Prj\Lib\DEVELO~1\EX749C~1\Sources;C:\Prj\Lib\DEVELO~1\EX0A1A~1\Sources;C:\Prj\Lib\Mad\madBasic\BDS4;C:\Prj\Lib\Mad\MADDIS~1\BDS4;C:\Prj\Lib\Mad\MADEXC~1\BDS4;C:\Prj\Lib\Mad\MADKER~1\BDS4;C:\Prj\Lib\Mad\MADSEC~1\BDS4;C:\Prj\Lib\Mad\madShell\BDS4;C:\Prj\Lib\Mad\madShell\DeXter;C:\Prj\Lib\Mad\madExcept\..\Plugins;

I've copied it from the IDE's path like I have done in the path and used a program to shorten the path names.

Although there are no spaces in that path, it still can't find indy's IdCoder.dcu at C:\Program Files\CodeGear\RAD Studio\5.0\lib\Indy10

According to the d2007 environment variables, $(BDS) would apparently expand to c:\program files\codegear\rad studio\5.0

The IDE is considering this library path to be valid.

Why is this happening? I bet it's a simple mistake I haven't thought of!

Thank you for your help!

+2  A: 

You could try to put the paths in quotes, that's the standard way of handling path-/filenames with spaces in Windows, though I never tried that in Delphi DCUs.

So, instead of

$(BDS)\Lib\Indy10

try

"$(BDS)\Lib\Indy10"

You could also try

"C:\Program Files\CodeGear\RAD Studio\5.0\lib\Indy10"

to check if the environment variable is correct.

schnaader
thank you but it doesn't fix the problem.
X-Ray
Perhaps you have to put the whole directory list into quotes, like in Vladimir's example, but I guess the problem really is somewhere else...
schnaader
at some point after the quotes it started working. not sure what else was wrong but it works now. thank you!
X-Ray
+1  A: 

Is the $(BDS) environment variable set when you're compiling the program from the command-line? If not, that might be the problem.

Putting quotes around paths containing spaces will likely solve the problem with spaces. This has worked for me:

-U"C:\Path to libraries\First library;C:\Path to libraries\Second library;C:\Path to libraries\Third library"

CyberShadow
thank you Vladimir!
X-Ray
+1  A: 

Check if you have applicationname.cfg file in the current folder. Dcc32 will try to read configuration from that file first. Only if the file does not exist will it read from dcc32.cfg.

gabr
thank you gabr--i didn't know that!
X-Ray
+2  A: 

Although .cfg files do still work in the Delphi 2007 command line compiler, you should really be using MSBuild to compile your projects. CFG files are not used by the IDE anymore. Any compiler options you set design time do not get written to the .cfg file. Using MSBuild is not harder then using .cfg. And if you want it is even more flexible since you can change the actual build processes.

msbuild YourProject.dproj

Lars Truijens
i should move forward to MS Build at some point soon. thank you for your help.
X-Ray