Discussion:
BCB 2007 Importing problem ?
(too old to reply)
Sasan
2008-07-12 04:53:54 UTC
Permalink
Hi

My project written with BCB 2006 when importing it to C++ Builder 2007 many
problems found:

- Many forms .dfm files don't imported (only cpp file imported without .dfm
!!) ?
- I create new project on BCB 2007 from scratch and add project form's one
by one but problem exist ?

In fact 10 specific forms has this problem, I open .cbproj file on this
forms many items not exist.
Like DataModuleForm.cpp is my data module form, proj file must include this
lines:

1 <CppCompile Include="DataModuleForm.cpp">
2 <Form>fcDM</Form>
3 <DependentOn>DataModuleForm.h</DependentOn>
4 <BuildOrder>9</BuildOrder>
5 </CppCompile>

6 <FormResources Include="DataModuleForm.dfm" />

But lines 2, 3 and 6 dos not exist, I try to add this lines manually but
problem exist also !.

Can help me why this happens ?

Kind Regards,
sasan.
Clayton Arends
2008-07-12 22:07:46 UTC
Permalink
Post by Sasan
- Many forms .dfm files don't imported (only cpp file imported
without .dfm !!) ?
- I create new project on BCB 2007 from scratch and add project form's
one by one but problem exist ?
Yes, this is an unfortunate problem in RAD2007. The only time the forms get
correctly added to new projects is when creating a new form. Adding an
existing form leaves out the .H and .DFM file dependencies from the project
file.
Post by Sasan
But lines 2, 3 and 6 dos not exist, I try to add this lines manually but
problem exist also !.
What do you mean "but problem exist also" ? Manually adding these lines is
currently the only workaround. I've done so successfully on many projects.
Be sure to close the project in the IDE first before editing the project
file with notepad or similar editor.

Clayton
Sasan
2008-07-13 04:59:12 UTC
Permalink
Post by Clayton Arends
What do you mean "but problem exist also" ? Manually adding these lines
is currently the only workaround. I've done so successfully on many
projects. Be sure to close the project in the IDE first before editing the
project file with notepad or similar editor.
Thank you, my mean is after editing cproj file, In project manager shown
source file contain .cpp, .h and .dfm but i can't edit form resource !
Form designer not show !!

Regards,
sasan.
Post by Clayton Arends
Post by Sasan
- Many forms .dfm files don't imported (only cpp file imported
without .dfm !!) ?
- I create new project on BCB 2007 from scratch and add project form's
one by one but problem exist ?
Yes, this is an unfortunate problem in RAD2007. The only time the forms
get correctly added to new projects is when creating a new form. Adding
an existing form leaves out the .H and .DFM file dependencies from the
project file.
Post by Sasan
But lines 2, 3 and 6 dos not exist, I try to add this lines manually but
problem exist also !.
What do you mean "but problem exist also" ? Manually adding these lines
is currently the only workaround. I've done so successfully on many
projects. Be sure to close the project in the IDE first before editing the
project file with notepad or similar editor.
Clayton
Sasan
2008-07-13 09:01:21 UTC
Permalink
Wow, I found the problem :)

On new form BCB add to line of code to the header file:
#ifndef DataModuleFormH
#define DataModuleFormH

If define header file differ with file name this problem occurs, Later after
creating forms (10 form: show problem) I changed file name and define header
related to old file name that cause this problem.
With changing header file problem solved.

Sasan.
Post by Sasan
Hi
My project written with BCB 2006 when importing it to C++ Builder 2007
- Many forms .dfm files don't imported (only cpp file imported without
.dfm !!) ?
- I create new project on BCB 2007 from scratch and add project form's one
by one but problem exist ?
In fact 10 specific forms has this problem, I open .cbproj file on this
forms many items not exist.
Like DataModuleForm.cpp is my data module form, proj file must include
1 <CppCompile Include="DataModuleForm.cpp">
2 <Form>fcDM</Form>
3 <DependentOn>DataModuleForm.h</DependentOn>
4 <BuildOrder>9</BuildOrder>
5 </CppCompile>
6 <FormResources Include="DataModuleForm.dfm" />
But lines 2, 3 and 6 dos not exist, I try to add this lines manually but
problem exist also !.
Can help me why this happens ?
Kind Regards,
sasan.
Loading...