'Delphi'에 해당되는 글 2건

  1. 2015.06.18 BC++ Enable Debugging
  2. 2015.05.29 W1010 Method '%s' hides virtual method of base type '%s' (Delphi)

BC++ Enable Debugging

할거리/BC 2015. 6. 18. 16:43

Ref : http://support.smartbear.com/viewarticle/54602/


This topic explains how to prepare 64-bit applications created with Embarcadero C++Builder XE3 - XE5 for AQtime.

To learn how to prepare 32-bit applications created with C++Builder, see Compiler Settings for Embarcadero C++Builder XE3 - XE5 (32-bit). To learn how to prepare applications created with other C++Builder versions, see Compiler Settings for Native Applications.

Note:64-bit applications created with Embarcadero RAD Studio XE3 - XE5 are not currently supported by the Allocation profiler.

To prepare a 64-bit Embarcadero C++Builder application for AQtime, first of all, you need to make sure that it includes debug information. Follow these steps:

  1. Open your project in C++Builder XE3, XE4 or XE5.

  2. Choose Project | Options from the main menu to open the Project Options dialog.

  3. In the tree on the left of the dialog, select the C++ Compiler | Debugging category. To include symbolic debug information, set the Debug information option to True.

    Project Options: C++ Compiler | Debugging
    Click the image to enlarge it.
  4. To set the Delphi compiler options, select the Delphi Compiler | Compiling category from the tree view on the left of the dialog:

    • To include symbolic debug information, set the Debug information option to True. In addition, to refer this information to source line numbers, set the Local symbols option to True.

      Project Options: Delphi Compiler |Compiling
      Click the image to enlarge it.
    • (Optional) To generate stack frames when using the Delphi compiler, set the Stack frames option to True.

      Project Options: Delphi Compiler | Compiling
      Click the image to enlarge it.
  5. Switch to the C++ Linker category and set the Full debug information option to True.

    Project Options: C++ Linker
    Click the image to enlarge it.
  6. To generate a map file that contains information on the application’s global symbols, source files and source line numbers, switch to the C++ Linker | Output category and set theMap file type option to Map file with segmentsMap file with publics or Detailed segment map.

    Project Options: Directories and Conditionals
    Click the image to enlarge it.
  7. Switch to the C++ (Shared Options) category and check the Library path option. Make sure that the path contains the $(BDS)\lib\$(PLATFORM)\debug folder:

    Project Options: Directories and Conditionals
    Click the image to enlarge it.
  8. Once you have set the compiler and linker options correctly, rebuild your application and it will be ready for profiling. If you are profiling an ActiveX control or a COM server, you need to register its “debug” version in the system (See Profiling COM Applications).

When your application is ready for release, remember to recompile it without debug information to reduce the application size.

Note:AQtime is incompatible with some third-party tools that modify the binary code of your application (for example, those that add a custom exception handling mechanism). An example of such a tool is EurekaLog. We recommend that you profile your application before processing it with such tools.

Nevertheless, AQtime is compatible with AQtrace and supports profiling of applications that use AQtrace for error reporting.

See also
Compiler Settings for Native Applications


[dcc32 Warning] SjAppGetVersion.pas(13): W1010 Method 'Create' hides virtual method of base type 'TComponent'


  TComponent = class(TPersistent, IInterface, IInterfaceComponentReference)

  public

    constructor Create(AOwner: TComponent); virtual;


  TSjAppVersion = class(TComponent)

  public

    constructor Create( AOwner : TComponent );

There are three alternatives to take when solving this warning. 

(1) constructor Create( AOwner : TComponent ); override;

You could specify override to make the derived class' procedure also virtual, 

if the ancestor's respective method is declared as virtual or dynamic, and thus allowing inherited calls to still reference the original procedure. 

(2) constructor Create2( AOwner : TComponent );

You could change the name of the procedure as it is declared in the derived class.

  Both of these methods are exhibited in the source code snippets above. 


(3) constructor Create( AOwner : TComponent ); reintroduce;

  You could add the reintroduce directive to the procedure declaration 

to cause the warning to be silenced for that particular method.

The reintroduce keyword instructs the Delphi compiler to hide the respective method 

and suppress the warning, 

because it is unlikely to override a method of the same name from a base class that is not virtual or dynamic. 

1 

글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!