Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DCC32 cant find *.dcu files

1,254 views
Skip to first unread message

Andy

unread,
Nov 28, 2004, 12:51:15 PM11/28/04
to
Hi,

Currently i am using delphi 5 and I facing a problem. When i try to write a
dos command line to compile a project, it show a error message "Fatal: File
not found: 'Unit1.dcu'.

My command line is as shown as below :
C:\>Dcc32 -n"C:\Test" -u"C:\Test" C:\Test\Project1.dpr

I try to use the -n for DCU directory and -u for unit directories also still
got this problem. If i try to use the delphi 5 application there and compile
it then it do not have problem.

Is that i have left out any command line to handle the DCU file problem?
Any idea of that?

Thank you
Andy


Mike Williams [TeamB]

unread,
Nov 28, 2004, 7:13:46 PM11/28/04
to

Do you have all of the source code? DCU files are not compatible between
versions of Delphi and you didn't say which version you're having a
problem with. Also, I don't understand why you're specifying the paths
the way you are. Why not just:

C:\Test> dcc32 project1.dpr

--
-Mike (TeamB)
Newsgroup guidelines: http://www.borland.com/newsgroups/guide.html

Andy

unread,
Nov 28, 2004, 9:47:56 PM11/28/04
to
Dear Mike,

Thank you for your reply. Actually i only just doing a testing first for
using the dos command line to compile the application before i really apply
it to my application. It is work if i change to the test folder and type the
command dcc32. I try to specify the path because i not only compile one
application in my batch file. For example, if i have two application call
test1 and test2 then i need to change my directory to the specify test1 and
test2 folder to type the dcc32 command to make it work. So, i try to specify
the commandline as

Dcc32 C:\Test1\Project1.dpr
Dcc32 C:\Test2\Project2.dpr

but it will show the error that i mentioned. I have all the source code but
only the *.dcu files are not in the source code. It is because the dcu is
after i have compiled then it will be created. Is that anyway to write the
commandline instead of change to the directory to type the dcc32 command?

Thank you.

Regards,
Andy

"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message
news:Xns95AFCDCAED...@207.105.83.66...

Mike Williams [TeamB]

unread,
Nov 28, 2004, 10:27:39 PM11/28/04
to
On 28 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> Is that anyway to write the
> commandline instead of change to the directory to type the dcc32
> command?
>

That should work fine. I usually use a DCC32.CFG file to specify unit
paths. What happens when you do just:

dcc32 c:\test1\project1.dpr

??

It seems to me that it should find units that are in the same directory
as the project but I'd have to verify that to be sure.

Andy

unread,
Nov 29, 2004, 1:27:27 AM11/29/04
to
Dear Mike,

When i type this command line under dos prompt, it will show the message


"Fatal: File not found: 'Unit1.dcu'"

It seems can't compile out the *.dcu file if i specify the path. But after i
compile the application under delphi 5 program and not under dos command
line, it will success create the Unit1.dcu file. Then i try to type the
command line as below :

dcc32 c:\test1\project1.dpr

It will work. I think it is because the Unit1.dcu already exist under the
Test1 folder there. But i wonder is that anyway to do it instead of change
to the Test1 folder directory to type the dcc32 command if the *.dcu is not
there? Thanks for advice.

Regards,
Andy

"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message

news:Xns95AFEEA992...@207.105.83.66...

Mike Williams [TeamB]

unread,
Nov 29, 2004, 9:07:45 AM11/29/04
to
On 29 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> When i type this command line under dos prompt, it will show the
> message "Fatal: File not found: 'Unit1.dcu'"
> It seems can't compile out the *.dcu file if i specify the path. But
> after i compile the application under delphi 5 program and not under
> dos command line, it will success create the Unit1.dcu file. Then i
> try to type the command line as below :
>
> dcc32 c:\test1\project1.dpr
>
> It will work. I think it is because the Unit1.dcu already exist under
> the Test1 folder there. But i wonder is that anyway to do it instead
> of change to the Test1 folder directory to type the dcc32 command if
> the *.dcu is not there? Thanks for advice.

I just did a quick test and as I suspected the command line compiler
finds the unit properly when running with the complete path to the
program on the command line. What happens when you delete *.DCU before
attempting the compile?

Andy

unread,
Nov 29, 2004, 10:22:12 AM11/29/04
to
When i try to delete the *.dcu file before compile then it will show the
error message that i have mentioned.
"Fatal: File not found: 'Unit1.dc'"

Only if i type the command line under the Test1 folder there without the
*.dcu still can compile. The command
dcc32 c:\test1\project1.dpr will not work if the *.dcu files is not in the
Test1 folder there.


"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message

news:Xns95B0670B9E...@207.105.83.66...

Mike Williams [TeamB]

unread,
Nov 29, 2004, 9:40:27 AM11/29/04
to
On 29 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> Only if i type the command line under the Test1 folder there without
> the *.dcu still can compile. The command
> dcc32 c:\test1\project1.dpr will not work if the *.dcu files is not in
> the Test1 folder there.

Can you zip up your project and post it in the attachments group?

Gordon Whittam

unread,
Nov 29, 2004, 12:11:56 PM11/29/04
to
In article <41ab3e83$1...@newsgroups.borland.com>, Andy wrote:
> When i try to delete the *.dcu file before compile then it will show the
> error message that i have mentioned.
> "Fatal: File not found: 'Unit1.dc'"
>

You need to change to the directory the dpr is in:

cd C:\Test

C:\>Dcc32 /B+ "C:\Test\Project1.dpr"

Gordon
--
MGCSoft Graphical and equation editors
http://www.mgcsoft.com/

Andy

unread,
Nov 30, 2004, 2:46:48 AM11/30/04
to
Dear Mike,

I can't attach the project to the newsgroup. Actually it is just a simple
program
to test it work or not by using command line to compile the program. When i
try to
type the command as below :

c:\>dcc32 c:\test\project1.dpr

It will not work unless i change to the Test directories then it only can
work.
Is that really need to change to the Test directories to type the command
line.
If it is need to do like that then no choice i need to change the directory
to the
mentioned folder to type the command line. Anyway thank you for your help.

Regards,
Andy

"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message

news:Xns95B06C9675...@207.105.83.66...

Mike Williams [TeamB]

unread,
Nov 30, 2004, 8:48:28 AM11/30/04
to
On 30 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> c:\>dcc32 c:\test\project1.dpr
>
> It will not work unless i change to the Test directories then it only
> can work.
> Is that really need to change to the Test directories to type the
> command line.
> If it is need to do like that then no choice i need to change the
> directory to the
> mentioned folder to type the command line.

I don't know why you have to change directories. I created a test
project with a test unit and successfully compiled it from the root
directory passing the entire path to the project on the command line.
That's why I asked to see your code. Perhaps you can try with my simple
program that's so small I can just paste it here:

program test;
{$APPTYPE CONSOLE}
uses Unit1;
begin
DoSomething;
end.

unit unit1;

interface

procedure DoSomething;

implementation

procedure DoSomething;
begin
writeln('Hello');
end;

end.

Andy

unread,
Nov 30, 2004, 8:58:02 PM11/30/04
to
Dear Mike,

Thats mean when you try to write the command line as below :

c:\>dcc32 c:\test\project1.dpr

It will work. Maybe I try to send the my testing program to your email
address and check for me. Thanks a lot.


Regards,
Andy

"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message

news:Xns95B163C5BE...@207.105.83.66...

Mike Williams [TeamB]

unread,
Nov 30, 2004, 8:02:47 PM11/30/04
to
On 30 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> Thats mean when you try to write the command line as below :
>
> c:\>dcc32 c:\test\project1.dpr
>
> It will work. Maybe I try to send the my testing program to your email
> address and check for me. Thanks a lot.

Yes, the above works for me using Delphi 7. It compiles the project and
the unit file found in the project directory. I don't think you ever
mentioned which version you are having trouble with.

Mike Williams [TeamB]

unread,
Nov 30, 2004, 8:49:36 PM11/30/04
to
On 30 Nov 2004, "Andy" <cc...@gprotechnologies.com> wrote:

> Maybe I try to send the my testing program to your email
> address and check for me.

I got the test program and narrowed the problem down to the

Unit1 in 'Unit1.pas' {Form1};

line in the project file. The IDE uses the above syntax to help it keep
track of forms but it's not really needed by the compiler itself.

You can change it to include the path:

Unit1 in 'c:\test\Unit1.pas' {Form1};

or delete the path part completely:

Unit1;

which allows the command line compiler to work without changing to the
directory. I'll have to investigate some more to determine if there's
anything that can be done to fix this.

Andy

unread,
Dec 1, 2004, 6:34:36 AM12/1/04
to
Dear Mike,

It is work if i remove the Unit1 in 'Unit1.pas' {Form1} in delphi 5 as
below:

Unit1;

I can run the command line to compile it without *.dcu file under delphi 5.
But it means i need to remove all the path for all *.pas file for the
particular program.

Regards,
Andy


"Mike Williams [TeamB]" <mlwil...@gmail.com> wrote in message

news:Xns95B1DE0A11...@207.105.83.66...

0 new messages