Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Liner Error

Posted on 2007-12-01
13
Medium Priority
?
234 Views
Last Modified: 2013-11-17
I have the linker error: Unable to open name.DFM, I don´t knowwhat to do...anyone knows?
0
Comment
Question by:luisanaz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20390326
what are you using?  C++ builder or Visual C++.net?
DFM is a delphi backup file. Are you sure your compiler supports this kind of file?
0
 

Author Comment

by:luisanaz
ID: 20393202
I´m using C++ builder
0
 

Author Comment

by:luisanaz
ID: 20393208
Is only read
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20393221
you mean the dmf  file is readonly? maybe you can change it manually from the windows explorer.
0
 

Author Comment

by:luisanaz
ID: 20393354
I meant that I have a program that is only read, when I try to run it, I have the linker error... asking for DFM, I don´t have any idea what to do about it...
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20393363
do you have a linker error at runtime? that sounds contradictory.
0
 

Author Comment

by:luisanaz
ID: 20393411
Uhm.. no... (sorry about my english) I have none error or warning when I compile units, but when I make the project I have the linker error, not at runtime
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20393487
It is a strange error, appears to be a bug in Borland C++ as explained here:
http://qc.borland.com/wc/qcmain.aspx?d=55346

but I suggest you to move this question the the Borland C++ Topic, you have specified Visual C++.NET
0
 

Author Comment

by:luisanaz
ID: 20403659
How can I move the question?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20403835
the question has been moved.
0
 
LVL 25

Assisted Solution

by:kode99
kode99 earned 800 total points
ID: 20404988
DFM files contain the information that is used to draw a form.  So the settings for the components,  sizes and locations etc are in this file.  So you will not be able to compile a program without the needed DFM files.

You should probably do a search for the file,  hopefully it is just not in the right place and not actually missing.  Normally it would be in the same directory as the source code files.

You could also look for the backup version of the file which would be '<name>.~dfm'.  If you cannot find the original this file may be enough to get you going as it is revision prior to the last save.  Just take out the '~' and try it.  I would suggest making a backup of everything before you do this.



0
 
LVL 18

Accepted Solution

by:
Jose Parrot earned 1200 total points
ID: 20408442
Hi,
You can create new DFM files, if you don't find them, as per kode99 directions.
A suggestion to do that follows.

1. Create a new project. By default, it begins with Unit1, showing Form1.
2. By looking at your original include file, say Unit1.h, you can discover what are the components of such Unit.
Lets imagine that your original Unit1.h is:

class TForm1 : public TForm
{
__published:      // IDE-managed Components
      TEdit *Edit1;
      TListBox *ListBox1;
      TButton *Button1;
      TButton *Button2;
      TEdit *Edit2;
      TEdit *Edit3;
      void __fastcall Button1Click(TObject *Sender);
      void __fastcall Button2Click(TObject *Sender);
private:      // User declarations
public:            // User declarations
      __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------

This include file tells us that Unit1 has the following components: three TEdit, two TButton and one TListBox.
3. Create, in your new Form1, these components, by clicking in the menus at the tabs Standard, Additional, etc. then in the Form. Arrange the layout as you think adequate for the application.
4. Rename the components (Form, buttons, Edits, etc.) to have the same names of your original Unit1.h file, if they are different to the default names. You should rename them in the Object Inspector, in the Name property, not directly in Unit1.h. Don't edit directly your new Unit1.h in the IDE-managed Components section.
5. Copy from original Unit1.cpp  code into the new Unit1.cpp of your project. In my example: the code for
void __fastcall TForm1::Button1Click(TObject *Sender), and so on.
6. Repeat such procedure for each Unit.

That way, you have the same .cpp files, almost the same .h files and new .dfm files.
Of course, your job will be easy if the original code maintains default names and the application has few components.

Don't forget to save each file you create to reuse it in case of wrong coding.

Hope this helps...

Jose
0
 
LVL 25

Assisted Solution

by:kode99
kode99 earned 800 total points
ID: 20409036
Really hope there is a backup copy of the dfm in question somewhere.  Even a copy that is several revisions old would probably be much easier to start from.

If you have a exe file of the project you can use a resource editor to get  the dfm information out of it.  Here is a free open source editor written in Delphi,  

http://www.wilsonc.demon.co.uk/d10resourceeditor.htm

Porbably worth a try before reverse engineering the dfm by hand,  that can be pretty tedious.  If there were complex components involved it may take quite a bit of work to get it right.  A simple form with basic controls like edits and buttons would be quick to do though.


0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Suggested Courses

618 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