I've used the trial of DevExpress but it's expired. Now when I add a standard TImage and try to compile it gives me the error:
[dcc32 Fatal Error] filter.pas(9): F1026 File not found: 'dxGDIPlusClasses.dcu'
Any help appreciated.
Related
I have a problem to set watermark image format in the TgtImageWatermarkTemplate component (which is part of the Gnostice PDFtoolkit VCL library). I have the following code:
var
Watermark: TgtImageWatermarkTemplate;
begin
...
// create and set watermark properties
Watermark := TgtImageWatermarkTemplate.Create;
Watermark.ImageFormat := ofJPEG; // <- this line fails the compilation
...
end;
But it fails to compile with the following error:
[DCC Error] Unit1.pas(186): E2003 Undeclared identifier: 'ofJPEG'
[DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas'
Failed Elapsed time: 00:00:01.5
In which unit is the ofJPEG identifier declared (I think it's member of the TgtOutFormat enumeration)? Which unit should I add to my uses clause?
Please include gtCstPDFDoc unit in your PAS file. The enumeration TgtImageFormat is from that.
UPDATE: The enumeration values start with if and so it is ifJPEG.
I tried to disable ABSQuery1 controls before exporting data :
procedure TForm1.QExport4Dialog1BeforeExportRow(Sender: TQExport4;
Row: TQExportRow; var Accept: Boolean);
begin
ABSQuery1.DisableControls;
end;
But I get :
> [dcc32 Error] Unit1.pas(75): E2003 Undeclared identifier: 'TQExport4'
> [dcc32 Error] Unit1.pas(76): E2003 Undeclared identifier:
> 'TQExportRow' [dcc32 Error] Unit1.pas(204): E2005 'TQExport4' is not a
> type identifier [dcc32 Error] Unit1.pas(205): E2005 'TQExportRow' is
> not a type identifier [dcc32 Fatal Error] Project1.dpr(15): F2063
> Could not compile used unit 'Unit1.pas'
What am I doing wrong ?
Your error messages all indicate that you have not used the units in which the named symbols are declared. Add those units, those that declare TQExport4 and TQExportRow, to the uses clause of your Unit1.
It's usually worth consulting the documentation when you encounter a compiler error that you do not understand. Search for the error code, for example E2003. The documentation says:
The compiler could not find the given identifier - most likely it has been misspelled either at the point of declaration or the point of use. It might be from another unit that has not mentioned a uses clause.
The final sentence covers your scenario, although the author got in a tangle when writing that text and the words don't make a lot of sense. Sigh.
Incidentally, the example at the bottom of that documentation page made me sad. The author indicates a preference, when correcting mis-named variables, for the option requiring the fewest key strokes. Never mind getting the name right, just make it compile with the fewest key strokes and who cares about the next person to read the code. Pah!
I was screwing around with debug setting on my compiler and now I am getting these errors that I can't seem to get rid of.
[DCC Error] HASPCODE.PAS(223): E2003 Undeclared identifier: 'Result'
It didn't complain before, but now no matter what I said the debugging settings to it keeps raising the above error just for the HASPCODE.PAS file only.
For instance, Here is one of the functions where the error is raised.
function THasp.IsHasp:Boolean;
begin
Result := fIsHasp; <<=======
end;
The implicit function Result variable is only available when the extended syntax compiler option is enabled.
The Result variable. In the {$X+} mode, the predefined
variable Result can be used within a function body to hold
the function's return value.
I need a bit of help; I'm helping a friend port a Delphi app built years back to newer versions of Windows, as it currently only runs on Windows 95.
The code utilises 3rd party libraries from Woll2Woll for DB operations.
One of these libraries generates the error E2003 Undeclared identifier: 'self'.
I've been through a number of sites via Google and with my limited knowledge of Delphi (stemming from my Pascal training about 12 years ago and extrapolating my slightly rusted PHP, BASH, ColdFusion and ASP coding skills), I've run into a brick wall - I'm strapped for time and can't make sense of the info I'm coming across on the web.
The problematic code segment is from the wwwQuery.pas file and looks like this:
{$ifdef wwDelphi3Up}
procedure TwwQuery.OpenCursor(InfoQuery: Boolean);
{$else}
procedure TwwQuery.OpenCursor;
{$endif}
begin
{$ifdef wwDelphi3Up}
inherited OpenCursor(InfoQuery);
{$else}
inherited OpenCursor;
{$endif}
//Modded by Arie
//wwSaveAnswerTable(self, Handle, FAnswerTable);
wwSaveAnswerTable(self, Handle, 'FAnswerTable');
end;
The precise error messages are:
[DCC Error] wwQuery.pas(243): E2003 Undeclared identifier: 'self'
[DCC Error] wwQuery.pas(244): E2029 '.' expected but ';' found
[DCC Fatal Error] wwcommon.pas(285): F2063 Could not compile used unit 'wwQuery.pas'
Line 243 is the 2nd last line, just above the end;
The wwSaveAnswerTable function looks like this:
Function wwSaveAnswerTable(ADataSet: TDBDataSet; AHandle: HDbiCur; tableName: string): boolean;
What must I change the Self parameter to, to stop the compile error?
Thanks a stack.
The problem is related to compiler define wwDelphi3Up or any related up in code.
As you see next error message: [DCC Error] wwQuery.pas(244): E2029 '.' expected but ';' found
Compiler expects end of program, and line wwSaveAnswerTable(self, Handle, 'FAnswerTable'); are not compiled inside OpenCursor method. That's why Self is not defined.
You don't need to change parameter, because for sure will affect functionality.
Try to compile it without defines, if you are not use an ancient version of Delphi:
procedure TwwQuery.OpenCursor(InfoQuery: Boolean);
begin
inherited OpenCursor(InfoQuery);
wwSaveAnswerTable(self, Handle, 'FAnswerTable'); // Here prob FAnswerTable without quotes
end;
i am working on component for delphi 7 and delphi 2006, the component uses SynTaskDialog.pas from synopse, i have successfully used the SynTaskDialog.pas in delphi 7 component, but when i try to use it in delphi 2006 to create a component package. i get an error
i have found a solution for the same on synopse.info/forum
Quote:
I've found two workarounds: Either
replace the pointer arrays with string arrays like
TD_ICONS_IDENT: array[TTaskDialogIcon] of string =(
'', SMsgDlgWarning, SMsgDlgConfirm, SMsgDlgError, SMsgDlgInformation,
'', SMsgDlgInformation);
and remove some LoadResString calls or
2.replace the pointer arrays with functions like
GetIconIdent(TTaskDialogIcon): Pointer
but even after that i cannot compile the package for the component. and these errors come
[Pascal Error] E2201 Need imported data reference ($G) to access 'SMsgDlgOK' from unit 'SynTaskDialog'
[Pascal Error] E2201 Need imported data reference ($G) to access 'SMsgDlgYes' from unit 'SynTaskDialog'
[Pascal Error] E2201 Need imported data reference ($G) to access 'SMsgDlgNo' from unit 'SynTaskDialog'
[Pascal Error] E2201 Need imported data reference ($G) to access 'SMsgDlgCancel' from unit 'SynTaskDialog'
[Pascal Error] E2201 Need imported data reference ($G) to access 'SMsgDlgRetry' from unit 'SynTaskDialog'
[Pascal Error] E2201 Need imported data reference ($G) to access 'SCloseButton' from unit 'SynTaskDialog'
Why didn't you ask the question of the project forum?
A solution may enhance the official code of this Open Source unit.
OK - it may help me gain some SO points. ;)
AFAIK this "E2001" issue has already been identified - see this post and should have been fixed in the latest trunk. This is what sounds to work with Delphi 7, but not with Delphi 2006.
Here is a potential workaround of this compiler bug:
Define such a function:
function IconMessage(Icon: TTaskDialogIcon): string;
begin
case Icon of
tiWarning: result := SMsgDlgWarning;
tiQuestion: result := SMsgDlgConfirm;
tiError: result := SMsgDlgError;
tiInformation, tiShield: result := SMsgDlgInformation;
else result := '';
end;
end;
To be used as such:
if Inst='' then
Inst := IconMessage(aDialogIcon);
This is now committed in the project trunk.
Thanks for using our Open Source component!