Preprocessing Delphi.NET projects for Compact Framework Preview
I’ve created a Delphi Win32 project that preprocesses Delphi.NET project files so that it can enable a project to be compilable for the Compact Framework (without errors), using the Delphi for .NET Compact Framework Technology Preview.
The source and binary for the Delphi Win32 project is available on CodeCentral.
Share This | Email this page to a friend
Posted by Chee Wee, Chua on September 12th, 2005 under Delphi |33 Responses to “Preprocessing Delphi.NET projects for Compact Framework Preview”
Leave a Comment
Server Response from: blogs2.codegear.com

RSS Feed
September 12th, 2005 at 10:09 am
Cool. I wrote an IDE addin yesterday so that I could do a build from inside the IDE and output the build info to the message view and copy the output to the shared storage folder for the emulator.
I also wanted to be able to assign a shortcut and add the command to a toolbar.
Can’t wait to try out your solution.
cheers,
Jeremy
September 14th, 2005 at 12:14 am
I’m soon to be starting a project involving Pocket PC’s, which run Windows Mobile 2003. Is this the same as the Compact Framework? You guys are doing so many things, I get totally lost in the acronyms.
September 14th, 2005 at 12:25 am
Hi Chris,
In a way, it is. You need to get the Delphi for .NET Compact Framework Technology Preview and this Preprocessor application that I’ve developed helps you to remove code not supported by Compact Framework.
September 14th, 2005 at 1:43 am
You da man!
September 14th, 2005 at 1:46 am
One more thing… the .PAS file is missing from your CodeCentral entry…
September 14th, 2005 at 8:25 am
Daniel,
Notice I didn’t say "complete" :> I’ll update the CC entry. Thanks for the feedback!
September 14th, 2005 at 7:46 pm
Hi, I have a problem… when I use you preprocessor on a WinForm project file I have a windows error… on kernel32.dll like this…
AppName: makecfcompatible.exe AppVer: 0.0.0.0 ModName: kernel32.dll
ModVer: 5.1.2600.2180 Offset: 0001eb33
What’s wrong ?
September 14th, 2005 at 7:53 pm
Hi , found a first solution… on prev post…
The DCCIL_CF const is wrong for me… cause my path is .. C:\Programmi\Borland\BDS\3.0\CFPreview\bin instead of your const C:\Program Files\Borland\BDS\3.0\CFPreview\bin\dccil.exe …
Let me know if you can rebuilt the application because I have errors on compiling your project !
September 14th, 2005 at 7:57 pm
Hi Elias,
Updated the CC entry. Please download again.
November 22nd, 2005 at 8:32 pm
Hey one of my sample projects doesnt compile when i try… i get this error ,
WinForm.pas(54) Error: E2003 Undeclared identifier: ‘SuspendLayout’
WinForm.pas(59) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(60) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(66) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(67) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(73) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(74) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(79) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSiz
WinForm.pas(84) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(86) Error: E2003 Undeclared identifier: ‘ResumeLayout’
if i got into my form and goto the the init. components section and remove / comment out those lines it works… does your dll only process the DPR ?
Justin
AKA Delphian
November 22nd, 2005 at 9:22 pm
It’s not clear what you are doing.
Please check whether all your files have been included in your project. If not, please include them.
Please provide complete steps of what you’re doing, and the paths to the complete files in your project.
November 23rd, 2005 at 9:43 am
Please provide complete steps of what you’re doing, and the paths to the complete files in your project.
November 24th, 2005 at 10:10 am
*** Please provide complete steps of what you’re doing, and the paths to the complete files in your project. ***
So far, you’ve provided nothing I’ve asked for, so I can’t help you.
November 24th, 2005 at 11:32 am
The Path to my project is
c:\program files\borland\dotnet\MPlayerDotNet
I have one pas file in my project called WinForm.pas. It is included as " Winform in c:\program files\borland\dotnet\MPlayerDotNet\WinForm.Pas" in the uses section.
I point your sample compiling app at " c:\program files\borland\dotnet\MplayerDotNet\WinFormTest.dpr"
what else do you need ?
Justin
November 26th, 2005 at 2:16 pm
Justin,
When did you download the preprocessor? If it’s not recently downloaded, you might want to download it again.
Please post the contents of DCCCF.OUTTXT.
The preprocesser processes all files, not just .dpr or .dpk
November 26th, 2005 at 8:53 pm
Prob somewhere around the 21st of this month , have you any changes since ?
Kind Regards
Justin
November 26th, 2005 at 11:12 pm
Please do not skip anything I write. I wrote previously, post the contents of DCCCF.OUTTXT
November 27th, 2005 at 8:32 am
pritty much as i posted a few posts ago..
i suspect the error E2003 means that the file being compiled hasnt been fixed.
Borland Delphi for .NET compiler version 17.0
Copyright (c) 1983,2004 Borland Software Corporation
Confidential pre-release version built Jul 6 2005 09:40:16
.NET Framework v1.1.4322 loaded
winformtest.dpr(1)
winformtest.dpr(14)
WinForm.pas(1)
WinForm.pas(6)
WinForm.pas(7)
WinForm.pas(9)
WinForm.pas(55) Error: E2003 Undeclared identifier: ‘SuspendLayout’
WinForm.pas(60) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(61) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(67) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(68) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(74) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(75) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(80) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSize’
WinForm.pas(85) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(88) Error: E2003 Undeclared identifier: ‘ResumeLayout’
WinForm.pas(120)
WinForm.pas(19) Hint: H2219 Private symbol ‘Button3′ declared but never used
winformtest.dpr(14) Fatal: F2063 Could not compile used unit ‘C:\Program Files\Borland\dotnet\MPlayerDotNet\WinForm.pas’
November 27th, 2005 at 9:47 am
Post the *ENTIRE* contents of DCCCF.OUTTXT.
November 27th, 2005 at 2:52 pm
That was the *ENTIRE* contents mate.
If i am doing something wrong tell me as i would appreate ANY help you can give.
Kind Regards
justin
November 27th, 2005 at 6:16 pm
The preprocessor is exactly that. A preprocessor to scan and fix all the files of a project.
On preprocessing, it compiles the entire project once, and note the errors. The result of the compiler output (which are usually errors) are sent to DCCCF.OUTTXT.
Then, it comments out every line on each project file that has error E2003 on it, and recompiles the project, and sends the compiler output to DCCCF.OUTTXT again.
Hence, the entire DCCCF.OUTTXT should look like as below. As it is, the DCCCF.OUTTXT you posted shows that the compiler ran only once, which is not possible at all.
Borland Delphi for .NET compiler version 17.0
Copyright (c) 1983,2004 Borland Software Corporation
Confidential pre-release version built Jul 6 2005 09:40:16
.NET Framework v1.1.4322 loaded
WinFormTest.dpr(1)
WinFormTest.dpr(13)
WinForm.pas(1)
WinForm.pas(6)
WinForm.pas(7)
WinForm.pas(9)
WinForm.pas(53) Error: E2003 Undeclared identifier: ‘SuspendLayout’
WinForm.pas(58) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(59) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(65) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(66) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(72) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(73) Error: E2003 Undeclared identifier: ‘TabIndex’
WinForm.pas(78) Error: E2003 Undeclared identifier: ‘AutoScaleBaseSize’
WinForm.pas(83) Error: E2003 Undeclared identifier: ‘Name’
WinForm.pas(85) Error: E2003 Undeclared identifier: ‘ResumeLayout’
WinForm.pas(112)
WinFormTest.dpr(13) Fatal: F2063 Could not compile used unit ‘WinForm.pas’
Borland Delphi for .NET compiler version 17.0
Copyright (c) 1983,2004 Borland Software Corporation
Confidential pre-release version built Jul 6 2005 09:40:16
.NET Framework v1.1.4322 loaded
WinFormTest.dpr(1)
WinFormTest.dpr(13)
WinForm.pas(1)
WinForm.pas(6)
WinForm.pas(7)
WinForm.pas(9)
WinForm.pas(112)
WinFormTest.dpr(13)
WinFormTest.dpr(23)
WinFormTest.dpr(85)
199 lines, 1.80 seconds, 16804 bytes code, 0 bytes data.
November 28th, 2005 at 7:20 am
OK so what causes YOUR program to only be used once ? does it need to be in the path or something silly like that ?
or maybe i need to save the text file to your apps path ?
Kind Regards
Justin
November 28th, 2005 at 9:50 am
Justin,
I’m afraid it’s beyond my ability and resources to help you or troubleshoot your issue.
If the preprocessor doesn’t help you, you’re on your own.
Alternatively, you might want to try Jeremy North’s Compact Framework Build Helper at http://www.jed-software.com/cf.htm
November 28th, 2005 at 10:03 am
I’ve allready built a replacement that is directly built into the Delphi 2005 ide. ( just finished as we speak ).
January 3rd, 2006 at 9:25 pm
The CFPreview compiler just EXPIRED!
It now only works if I set the date back on my PC.
Is there a newer version of the compiler available, or is Borland abandoning the CF?
January 5th, 2006 at 2:17 am
I just realised:
Unlike Delphi 2005, the Delphi 2006 compiler WILL compile to the Compact Framework as well! And it already comes with a more complete list of dcuil’s, in the lib\cf folder. Therefore the CFPreview is no longer needed. All that is needed, is the CFBuildHelper for Delphi 2006, the MakeCFCompatible.dll, and the Compact Framework SDK.
March 11th, 2006 at 3:41 am
Delphi 2006 just installed, i miss the .net compact framework sdk. google didn’t help me, just cf 1.1 and 2.0 redist., but not the SDK i need.
in vs.net it’s implemented, but not in Delphi,
right? any idea?
March 13th, 2006 at 7:36 am
Hi Christian,
Do you mean deliver? Delphi 2006 does not deliver or come with Compact Framework SDK.
Though you can use it to develop Compact Framework applications.
I guess I don’t really understand your question.
May 19th, 2006 at 6:43 am
CFBuildHelper for Delphi 2006 needs the CFP, but it’s only avaible for Delphi 2005. There isn’t any CFP for Delphi 2006 ?
May 19th, 2006 at 2:00 pm
What’s CFP? Maybe you want to ask Jeremy on his requirements?
May 19th, 2006 at 9:31 pm
Compact Framework Preview…. the compiler for CF
July 26th, 2006 at 8:10 pm
Hello, very Nice Tool, but in German Versions - after some Updates it dosn’t work. So i renamed dccil.de (maybe the german translation of dccil messages) now it works.
August 4th, 2006 at 3:05 pm
The download URL might become broken link, I can not get it….