5/12/2019»»Sunday

Delphi Compiler Switches

5/12/2019
    52 - Comments

Description: The $Define compiler directive defines a Symbol.By doing so, the symbol is now On. When a symbol is on, $IfDef will compile conditional code, and $IfNDef.

  1. Delphi Compiler Versions
Debugging DLL compiled with Delphi 7 in Delphi XE5
Dear Sirs/Madams, We are considering changing from Delphi 7 to Delphi XE5. Our project consists of a dll and an .exe file. I have begun converting the .exe file to Delphi XE5 and have successfully accessed the DLL compiled with Delphi 7. When I debug the DLL (using the 'run parameters' and changing 'host application' to the .exe file) in Delphi 7 I can set breakpoints etc. and they are triggered. However, when I attempt to debug the project in XE5, I get the following message: Module Load: xxx.dll. No Debug Info. Base Address: $015A0000. Process xxx.exe (2928) ...
Attempting to compile Delphi 5 code in Delphi XE5 is failing
Greetings All, If I'm not in the correct formum please tell me which one I should be in. Just upgraded to Delphi XE5 and am attempting to compile one of my Delphi 5 projects. I used Interbase Express I use either TDataSource -> TCDSProvider -> TDataSetProvider -> TIBQuery or TDataSource -> TClientDataSet -> TDataSetProvider -> TIBQuery Also used TIBDatabase, TIBTransaction, and TIBStoredProc I open the smallest project I have and click compile and almost immediately I receive this error Checking project dependencies... Compiling CITranEngine.dproj...
Delphi 7 Compiler takes > 3 minutes to compile
Ok, I'm pulling my hair out. This is reminiscent of Visual C++. I am working on a new project that includes the JCL/JVCL. It also uses a number of graphic images for buttons and backgrounds. If I change a single unit by adding a space before a line, save it, and compile I am looking at between a 3:00 and 4:20 minutes delay before the project is linked. I am running VMWare fusion 3.1 on a MacBook Pro Core 2 Duo 2.5 Ghz with 4Gb RAM. Initially I thought it had something to do with VMWare, but other projects compile in a snap. I have also experienced long pauses in th...
to compile or not to compile ?
Hi I've been dabbling with .net but am now trying to bite the bullet and learn it moving from classic asp I am a bit confused as to wether it is 'standard' practise to 'build' your project into dll's and upload these to the server or wether to simply use script and upload as you would classic asp to the server. what is 'standard' practise is there an advantage or disadvantage to using script / compiling thanks What is 'Standard' depends a bit upon the tool you are using. For VS.NET 2003, compiling into a dll placed in the bin folder is the default behavior. Othe...
Delphi XE5
Hi :-) Installed Delphi XE5 (RAD Studio Enterprise) and used it for a while. Then I changed the installation and added the mobile parts to do mobile Application Development. Installation gave no errors and I can start the Android emulator and I see my mobile phone Connects fine and becomes an available target. When starting a New blank (or any other) mobile Project I can not compile. Get the same error every time. Even when doing nothing at all before compiling. [DCC Fatal Error] Project1.dpr(1): F1027 Unit not found: 'System.pas' or binary equivalents (.dcu/.o) Cannot ...
What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...
Delphi 7 versus Delphi 2010 compiler directive {$Q-}
Hi, Could it be correct that there's a bug in Delphi7 where the compiler directive {$Q-} and {$Q+} works completely the opposite? When trying to build an existing Delhi 7 project in Delphi 2010 i found this weird behaviour. In D7 {$Q-} set overflow cheking on and in Delphi 2010 off ????? Regards, Arno Brinkman ABVisie -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Firebird open source database with many powerful SQL features: http://www.firebirdsql.org http://www.firebirdsql.info General database developer support: http://www.databasedevelopmentforum.com Support list for ...
dll fails when compiled with delphi 2010, but works with delphi 7
I may be doing good if someone can just point me to the right forum I have not created a dll for some time and have not written one with 2010 before. The dll I am creating will be called as a cfx function by either a ColdFusion or BlueDragon webserver. I have written cfx DLLs in the past. The function declaration is below, it is the standard declaration from ColdFusion or Bluegradon documention on creating a CFX. procedure ProcessTagRequest(Request: TCFXRequest); export; cdecl; Since this was the first time using 2010 I wrote a very basic function to build off that was not much mor...
delphi.general
Sorry if this is 'out of topic'! but since some days ago I can't read the group *embarcadero.public.delphi.language.delphi.general* Does anybody know if there's something wrong with it? Or maybe is my reader? (Thunderbird) I get this messagge when I try to read the latest messages: Error! newsgroup server responded:no such article found Perhaps the article has expired <692702@forums.embarcadero.com> (33145) Click here to remove all expired articles sergio wrote: > Sorry if this is 'out of topic'! but since some days ago I can'...
Delphi 2010: AV when switching from Default to debug layout and when closing Delphi
Hello, I experience strange AVs in rtl140.bpl when switching from the Default to the Debug Layout (e.g. when starting the application) or when closing Delphi 2010. I have a bunch of Addins (Modelmaker Code Explorer, EurekaLog, DDevExtensions, JCL, etc...), components installed. Any ideas/tools to possibly track down where the culprit is? Possibly simply an addin in combination with docked windows etc. Thanks, Thomas > {quote:title=Thomas Steinmaurer wrote:}{quote} > I experience strange AVs in rtl140.bpl when switching from the Default > to the Debug Layout (...
Is it posible to configure Delphi XE3 IDE to use Delphi 7 compiler/debuger
Hi! Like many other developer out there I have several project which has been developed with older version of Delphi (Delphi 7). Since theese projects rely on some components which are not compatible with newer versions of Delphi (no newer versions available) I'm forced to do any maintnance on theese projects using Delphi 7. Another solution would be to find replacment components which would provide me with same capabilities and work with latest versions of Delphi. But this would probbably require compleete rewritings of my projects (lots and lots of work). So currently I'm using...
Best practice when code should still compile with elder versions of Delphi but also Delphi 2009
When tryung to compile Turbopower Orpheus and other Turbopower products which I still use in my applications and therefor need to convert to Delphi 2009, I get lots of warnings even though others has made it possible to get Orpheus compiled. The problem is checking a char in a set which gives a type cast warning and suggests using a new function instead. [DCC Warning] ovcdbnum.pas(401): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit. So what would be the best practice here eg. correcting this ro...
C# compiling with Delphi
Hello, There has been a lot of talk of Compiling Delphi Pascal code to the .NET. I would like to be able to add C# code to Delphi (Win32) projects. That would be cool. Of course it would have limitations, but anyays, ability to cross use Object Pascal and C# would help a lot (Any direction). -TP- Tommi Prami wrote: > Hello, > > There has been a lot of talk of Compiling Delphi Pascal code to the .NET. > > I would like to be able to add C# code to Delphi (Win32) projects. That > would be cool. Of course it would have limitations, but anyays, ability &g...
Delphi Compiler BUG
test program: {$APPTYPE CONSOLE} program testbug; type TArray1 = array of char; TArray2 = array[0..2] of char; var a: TArray1; b: TArray2; c: array of char; procedure Check1(const A: TArray1); begin A[0] := '1'; // compiling passed, BUG1 end; procedure Check2(const A: TArray2); begin A[0] := '1'; // 'Error: E2064 Left side cannot be assigned to', OK end; procedure Check3(const A: array of char); begin A[0] := '1'; // 'Error: E2064 Left side cannot be assigned to', OK end; { main } begin Set...
Delphi

I'm modifying our VCL components so the end user's application links to our dcu files, instead of building our source code each time. We have everything working, but I want the debugger to stop on the user's code when an exception is raised. At first it would stop in our dcu and open the CPU window. I was able to prevent that by removing debug info from the dcu files. But now it still doesn't stop in the users code (like DevExpress libraries and others do).

The following screencast is a short example. The first time I cause an exception in the DevExpress code, and the debugger correctly stops in my button event. The second time I cause an exception in my components, but the debugger doesn't have my button event on the call stack, and doesn't show me where the problem was. Any ideas why?

Delphi compiler options

Currently building the DCU's with these options:

Update: The TDataSet methods in between my component and the button event seem to cause this behavior. If I instead call a direct method of my table, I get the expected behavior. I'm guessing there isn't anything I can do about this, but I'm still curious why it happens.

Jeremy Mullin
Jeremy MullinJeremy Mullin

2 Answers

If the sourcecode is build instead of dcu's, there is something wrong in the configuration.

Delphi

The dcus should be in the search path, the source in the browse path.

This way it is not possible for the compiler to not use the DCUs, and you can still debug.

Marco van de VoortMarco van de Voort

Have you tried setting/unsetting:Project Options -> Delphi Compiler -> Compiling -> 'Use debug .dcus' (in the Debugging subsection)

user998198user998198

Delphi Compiler Versions

Not the answer you're looking for? Browse other questions tagged delphivcl or ask your own question.