Solved

A problem compiling......DFM error...

Posted on 1998-10-31
4
2,747 Views
Last Modified: 2008-03-06
 I have an application that has 2 forms, each with its own .pas file.  This was working fine for quite some time, but I made a change a while back to add a 3rd form.  Now when I compile this, I get the error message saying "Error (0) File Not Found 'Unit1.DFM'
I do not have a Unit1.pas or Unit1.dcu, I think that may have been the old name, and it was so long ago I don't remember what I did to this, but I can't get past this error.  I tried renaming each of the current DFM's (3 of them) to unit1.dfm and recompiled to see if I could solve the problem (just guessing/trial and error), but that didn't work.  Can anyone help on this?
               Thanks  
0
Comment
Question by:jexd99
  • 2
4 Comments
 

Author Comment

by:jexd99
ID: 1345208
Forgot to mention ..... Delphi 3.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1345209
Do you mind sending me this project to me??? Without the EXE file only the sources and dfm files... No DCUs and DOFs and so on.... Send me all the DFMs and PASes

Cheers,
Viktor
E-mail viktor@megsinet.net
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 70 total points
ID: 1345210
I have noticed that there is a bug in Delphi that sometimes results in the name of the unit and the name included in the uses clause messed up. This always seems to happen during the process of saving the form after you have already saved it as unit1.pas.

Look in your uses clauses - do you see unit1 in it? If so change it to the correct name of the unit. (there will be a .PAS and .DFM file that don't appear in the uses clause...)

If you are going to try renaming them then make sure that you rename both the .DFM and the .PAS files in unison.

Cheers,

Raymond.

0
 

Author Comment

by:jexd99
ID: 1345211
Cha-ching! That took care of it. :-)

It had the old unit name listed (unit1.pas), as you mentioned, and I just removed it to make this work.  This does appear to be a small bug in D3. I'll have to be careful how I rename/save the units from now on, and make sure I don't get caught by this one
again.  Thanks a bunch.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now