 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Steve Doughton Guest
|
Posted: Fri Feb 02, 2007 8:52 pm Post subject: Using Express ForumLibrary in C++ Builder personality of BDS |
|
|
The following may also be of interest to anyone trying to compile a
design time package that includes a .pas file in C++ Builder.
The Borland C++ Builder 6 sources for the Forum Library will not build
in BDS 4.0. because if you have a .pas file that uses DesignIntf or
DesignEditors the compilation will fail with the message:
[Pascal Fatal Error] dxForumLibReg.pas(24): F1026 File not found:
'DesignIntf.dcu'
DesignIntf.dcu used to ship with C++ Builder in the
C:\Borland\CBuilder6\Source\Toolsapi folder but it is not shipped with
BDS 4.0
However the sources can be compiled in the Delphi personality of BDS 4.0
so that it is also usable in the C++ Builder personality.
In Delphi create a project group that has two new packages, one for the
run time code called dxForumLibD10 and another for the design time
code call dcdxForumLibD10.
It is important that you create new packages, not import an existing
project ( e.g. the Delphi 7 version dxForumLibD7.dpk ) - BDS 4.0 makes a
pigs ear of importing existing packages. I was getting errors like
[Pascal Fatal Error] OrckaScreenSaver.pas(552): F2039 Could not create
output file 'C:\Inetpub\wwwroot\cgi-bin\OrckaScreenSaver.hpp'
'C:\Inetpub\wwwroot\cgi-bin\ was set as the output folder in the
..bdsproj file but was not shown in the Project's Options dialog.
To the design time package dcldxForumLibD10 add dxfComboItemsEditor.pas,
dxfQTyperEditor.pas and dxForumLibReg.pas
To the run time package dxForumLibD10 add all the other .pas files
except dxfGrammar.pas, which in included by dxfExporer.pas
Make dxForumLibD10 create run time and design time code by select
Description in the left hand tree of its Project Options and choosing
"Designtime and runtime" in the usage options.
Select Linker in the tree and choose "Generate all C++ Builder files" in
the Linker output panel. IMPORTANT! This is the vital step to allow you
to use the components in C++ Builder AND Delphi.
Select Directories/Conditionals in the tree and set all three Output
directories to $(BDS)\lib ( actually I use $(BDS)\bpl to keep them
separate from the distrubuted libraries ). I have not yet found a way to
tell it where so save the .hpp files, they end up in the source folder
with the .pas files; perhaps you can edit the .bdsproj file.
Finally select Version Info and acknowledge Dev Express's copyright.
Repeat the process for the design time package dcldxForumLibraryD10 but
you MUST make dxForumLibD10 create design time code only by selecting
Description in the left hand tree of its Project Options and choosing
"Designtime only" in the usage options.
IMPORTANT! dcldxForumLibraryD10 must be design time only.
Save everything.
Next you need to add the missing versions to dxFLVer.inc. See the end of
this message.
Build dxForumLibraryD10.
Now add designide.dcp and dxForumLibraryD10.dcp to the Requires section
of dcldxForumLibraryD10.
designide.dcp is in C:\Borland\BDS4.0\lib ( $(BDS)\lib ).
dxForumLibraryD10.dcp is where-ever you told it to go when you set up
the Output directories in the Project Options.
Finally build and install cldxForumLibraryD10.
The Forum Library should now be available in Delphi and C++ Builder.
I hope I have remembered to mention everything important. Best of luck!
By the way I think it short sighted of Dev Express not to distrubute a
BDS version of the Forum Library; it was the Forum Library on the
Companion Tools CD that introduced us to Dev Express - we now use the
Quantum Tree List, Flow Chart and Express Bars - however there is no
equivalent of the OutlookBar, hence the need to port the Forum Library.
Note: Cross posted to devexpress.public.vcl.freelibrary and
borland.public.cppbuilder.vcl.components.writing - but they are on
different news servers!
Add this to dxFLVer.inc
{$IFNDEF DELPHI6}
{$DEFINE MSWINDOWS}
{$ENDIF}
{$IFDEF LINUX}
{$UNDEF MSWINDOWS}
{$ENDIF}
{$IFDEF LINUX}
{$DEFINE KYLIX1} { Borland Kylix 1 }
{$IFDEF CONDITIONALEXPRESSIONS}
{$IF CompilerVersion >= 14}
{$DEFINE KYLIX2} { Borland Kylix 2 }
{$IFEND}
{$IF CompilerVersion >= 14.50}
{$DEFINE KYLIX3} { Borland Kylix 3 }
{$IFEND}
{$ENDIF}
{$ENDIF}
{$IFDEF CLR} { Borland Delphi.Net }
{$DEFINE DELPHI4}
{$DEFINE DELPHI5}
{$DEFINE DELPHI6}
{$DEFINE DELPHI7}
{$DEFINE DELPHI8}
{$ENDIF}
{$IFDEF VER170} { Borland Delphi 9.0 }
{$DEFINE DELPHI4}
{$DEFINE DELPHI5}
{$DEFINE DELPHI6}
{$DEFINE DELPHI7}
{$DEFINE DELPHI8}
{$DEFINE DELPHI9}
{$ENDIF}
{$IFDEF VER180} { Borland Delphi 10 }
{$DEFINE DELPHI4}
{$DEFINE DELPHI5}
{$DEFINE DELPHI6}
{$DEFINE DELPHI7}
{$DEFINE DELPHI8}
{$DEFINE DELPHI9}
{$DEFINE DELPHI10}
{$IFDEF BCB} { Borland C++Builder 10 }
{$DEFINE CBUILDER3}
{$DEFINE CBUILDER4}
{$DEFINE CBUILDER5}
{$DEFINE CBUILDER6}
{$DEFINE CBUILDER10}
{$ObjExportAll On}
{$ENDIF}
{$ENDIF}
{$IFNDEF CLR}
{$IFNDEF BCB}
{$IFDEF DELPHI6}
{$DEFINE REGISTERSHELLCTRLS}
{$ENDIF}
{$ENDIF}
{$IFDEF DELPHI7}
{$WARN UNSAFE_CAST OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_TYPE OFF}
{$ENDIF}
{$ENDIF}
{$IFDEF REGISTERSHELLCTRLS}
{$DEFINE REGISTERCXSHELLCTRLS}
{$ENDIF}
{$IFDEF DELPHI6}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN UNIT_PLATFORM OFF}
{$ENDIF} |
|
| Back to top |
|
 |
Craig Farrell Guest
|
Posted: Sat Feb 03, 2007 3:10 am Post subject: Re: Using Express ForumLibrary in C++ Builder personality of |
|
|
Hi,
| Quote: | in BDS 4.0. because if you have a .pas file that uses DesignIntf or
DesignEditors the compilation will fail with the message:
[Pascal Fatal Error] dxForumLibReg.pas(24): F1026 File not found:
'DesignIntf.dcu'
|
In a simple design .pas being compiled in a
C++ package, it worked for me, to go to Project
| Options | Pascal Compiler | Other Options |
Additional Options and adding -LUDesignIDE.
I am not sure if your package scenario is more
complicated so that setting won't work for it.
C++ packages also have settable options under
the linker for packages, e.g. for Design-only
but my case did not seem to have to set that.
--Craig |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|