Root > Advanced topics > Compiling your project with EurekaLog > ecc32/emake command line options

ecc32/emake command line options

Previous pageReturn to chapter overviewNext page   

Note: this article is part of explaining compilation outside of IDE.

 

EurekaLog provides ecc32.exe, emake.exe, and ecc32speed.exe command-line compilers. These compilers pass all command line options to default dcc32.exe and make.exe compilers.

 

Additionally, these EurekaLog post-process compilers supports additional EurekaLog-related options, which allows you to customize EurekaLog's post-processing behaviour.

 

Notes:

EurekaLog options switches are not passed to default dcc32.exe and make.exe compilers.
EurekaLog options switches always start with "--el_" prefix.
Do not forget to wrap arguments with spaces in double quotes (").
EurekaLog is able to recognize both project files (such as .dpr) and project configuration files (such as .dproj). It's recommended to specify project configuration files (such as .dproj) when possible.
EurekaLog can recognize arguments with and without "=". For example, the following arguments are equivalent to each other:

 

--el_config"Project1.eof"

--el_config=Project1.eof

"--el_config=Project1.eof"

 

EurekaLog IDE expert calls ecc32.exe/emake.exe/ecc32speed.exe to post-process executables after compilation. Unlike command line, you have no direct control over calls to ecc32.exe/emake.exe/ecc32speed.exe when doing compilation from IDE. However, you still can use the custom EurekaLog arguments which are discussed below. Do the following to add any custom argument for ecc32.exe/emake.exe/ecc32speed.exe being invoked from IDE:

1. Open your project in IDE;
2. Go to the "Project" / "EurekaLog Options" menu;
3. Switch to the "Advanced" / "Custom/Manual" page;
4. Search for "ECC32AdditionalOptions" option. If such option not found (which is default), you can add it to any location. Example of option:

 

ECC32AdditionalOptions="--el_compiler=dcc32speed.exe --el_priority=$20"

 

Important note: Double-quotes in the example above is a part of the settings syntax for the "Custom/Manual" page and not a part of the command-line arguments itself.

 

The above line is just example, you can alter it as you want to.

 

Notes:

There is no "EMAKEAdditionalOptions" option. Use "ECC32AdditionalOptions" to add command-line options for both ecc32.exe/ecc32speed.exe and emake.exe
"ECC32AdditionalOptions" option does not replace command-line, it merely adds new arguments. Therefore, you should be careful and do not specify arguments which are already in the command-line (e.g. --al_alter_exe and --el_config).

 


 

EurekaLog-specific options for ecc32.exe/emake.exe/ecc32speed.exe are:

 

 

1. --el-prepare/--el_alter_exe

 

These options instructs the EurekaLog compiler to not compile the project (via invoking dcc32/emake) and only add the EurekaLog options and debug data into already compiled application (you can also optionally specify the compiled application's filename).

 

1. By default EurekaLog's compiler compile your application AND post-processes it.
2. By specifying any of the options - you will disable compilation, so EurekaLog's compiler will perform only pre/post-processing.

 

Note: you must have compiled .exe/.dll/.bpl file and a corresponding .map file to use --el_alter_exe option.

 

Basically, --el_prepare switch acts as pre-build event, --el_alter_exe acts as post-build event:

1. --el_prepare switch will modify .dpr source file by adjusting list of EurekaLog units in uses clause. This is useful when you switch between different EurekaLog configurations. This switch will do nothing in most cases (nothing to change), thus it is optional, but recommended.
2. --el_alter_exe switch will inject EurekaLog options and compressed debug information into your executable. This is mandatory.

 

You should never specify both --el_prepare and --el_alter_exe in the same command line. Use either --el_prepare or --el_alter_exe or none.

 

These switches are useful when used with 3rd party tools that are not able to directly run the ecc32.exe command-line compiler. It's also useful if you don't want to bother with compiling your project by yourself (via direct call to dcc32/make) and assign this task to someone else (such as IDE, FinalBuilder, etc.).

 

Delphi Example (Delphi 4-7)

 

--el_prepare=ProjectFile.dpr

--el_alter_exe=ProjectFile.dpr[;ProjectFile.exe]

 

Delphi Example (Delphi 2005-2006)

 

--el_prepare=ProjectFile.bdsproj

--el_alter_exe=ProjectFile.bdsproj[;ProjectFile.exe]

 

Delphi Example (Delphi 2007+)

 

--el_prepare=ProjectFile.dproj

--el_alter_exe=ProjectFile.dproj[;.\Debug\Win32\ProjectFile.exe]

 

C++Builder Example

 

--el_alter_exe=MakeFile.mak

--el_alter_exe=ProjectFile.bpr[;ProjectFile.exe]

--el_alter_exe=ProjectFile.bdsproj[;ProjectFile.exe]

--el_alter_exe=ProjectFile.cbproj[;.\Debug\Win32\ProjectFile.exe]

 

Non-Embarcadero Example

 

--el_alter_exe=NUL;MSCppDll.dll

 

Path ".\Debug\Win32\" is only an example. Replace it with your value or just remove it (in case of .exe file being in the same folder as project file).

 

Part in [] is optional, but recommended. Of course, you should remove [] symbols for real-life examples (e.g. --el_alter_exe=ProjectFile.cbproj;.\Debug\Win32\ProjectFile.exe).

 

Note: you can specify NUL as project file name if the following conditions are satisfied:

1. You have specified compiled file name (optional part of --el_alter_exe switch);
2. You have specified config file name via --el_config switch (see below);
3. You have specified mode via --el_mode switch (see below).

 

You may optionally use --el_source switch (see below) for non-Embarcadero compilers. --el_mode switch have no effect for non-Embarcadero compilers.

 

See this article to learn more about using NUL and --el_source.

 

 

2. --el_target

 

Specifies output file name. Optional. By default EurekaLog tries to get this from project's options (which is not always possible). It's not needed for --el_alter_exe switch, since output file name can be specified inside --el_alter_exe switch itself.

 

Example

 

--el_target=D:\Output\Bin\Project1.exe

 

Usually this switch is needed for projects with multiple configuration profiles, because EurekaLog may not know which profile to use.

 

Note: this option is ignored when --el_prepare or --el_alter_exe switches are used.

 

 

3. --el_profile

 

This option allows you to specify a profile name (build configuration). Profile name is used to select different configuration file. Usual names are 'Debug' and 'Release', but you are free to create any other custom configuration.

 

Profile name is used to select .eof file to load EurekaLog settings from. The base configuration is used by default (e.g. Project1.eof). Specifying non-empty profile name will load EurekaLog configuration from Project1_ProfileName.eof file instead.

 

Example

 

--el_profile=Debug

 

If there is no such .eof file - base configuration will be used.

 

Note: this option is ignored when --el_config switch is used.

 

 

4. --el_config

 

This option is used to compile your project with a different (alternative) EurekaLog options than options which are stored in the project itself.

 

Example

 

--el_config=Project1.eof

 

See also: how to get .eof file.

 

By default EurekaLog uses EurekaLog options from project configuration file (.dof, .bdsproj, .dproj, .bpr, .cbproj). It also respect external configuration option. You don't need to use this option if you want to compile your EurekaLog-enabled project (because your typical project configuration will be used automatically). You only need to use this option when your project does not contain EurekaLog configuration; or you want to override your settings.

 

See also:

 

 

5. --el_pid

 

Specifies Project ID (PID). Project ID is a unique GUID of the project. It is used by EurekaLog to identify projects. For example, for password storing (caching), BugID creation, alias building in bug trackers, etc. Different projects are supposed to have different project IDs.

 

By default - project ID is extracted from .dproj, .bdsproj, .cproj files and then stored in base configuration (.eof file). You may want to specify project ID manually when using external configurations (e.g. using --el_config option), sharing configurations between projects, or if you simply have different project for essentially the same program.

 

Example

 

--el_pid={72C4CABF-E763-4606-89DE-5AA914D8F763}

 

--el_pid=72C4CABF-E763-4606-89DE-5AA914D8F763

 

--el_pid=72C4CABFE763460689DE5AA914D8F763

 

You may create a new GUID to use as project ID. Or you may copy GUID from .dproj/.bdsproj/.cproj file.

 

Note: this option is ignored when --el_prepare switch is used.

 

 

6. --el_mode

 

Switches between Delphi and C++ Builder project. Optional. You must add this switch only if you rename EurekaLog compiler's file. Possible values are "Delphi" or "Builder".

 

Delphi example

 

--el_mode=Delphi

 

C++ Builder example

 

--el_mode=Builder

 

Default is "Delphi mode" for ecc32.exe/ecc32speed.exe and "C++ Builder mode" for emake.exe.

 

Note: ecc32.exe and emake.exe is the same file.

 

 

7. --el_ide

 

Specifies alternative IDE version. IDE version affects which dcc32 is used to compile project, also how .map file is parsed, and how unit names are encoded. You have to use correct IDE version. E.g. version 7 when you work with project compiled by Delphi 7.

 

Delphi 7 example

 

--el_ide=7

 

RAD Studio 10.1 Berlin example

 

--el_ide=24

 

Default version is determinated by ecc32.exe/emake.exe/ecc32speed.exe location. For example, ecc32.exe from C:\Program Files\EurekaLog 7\Packages\Delphi7\ will use version 7, ecc32.exe from C:\Program Files\EurekaLog 7\Packages\Studio14\ will use version 14. Therefore, you have to specify this option only if you copy ecc32.exe/emake.exe/ecc32speed.exe to non-standard folder, or when you want to compile/post-process project for another/different IDE.

 

Note: see IDE name mapping.

 

 

8. --el_compiler

 

This options instructs the EurekaLog to use alternative command-line compiler instead of default dcc32/make,

 

Example

 

--el_compiler=dcc64.exe

 

--el_compiler=dcc32speed.exe

 

"--el_compiler=C:\Program Files\CodeGear\Delphi\7.0\Bin\dcc32speed.exe"

 

Notes:

This option is ignored when --el_prepare or --el_alter_exe switches are used.
This is not the same as --el_mode option (see above). You can't change dcc32.exe to make.exe with --el_compiler option only. If you change Delphi compiler to C++ Builder (or visa versa) - you should use --el_mode option. If you want to change Delphi compiler to alternative Delphi compiler (or C++ Builder compiler to alternative C++ Builder compiler) - you should use --el_compiler option. Also, these two options can be used together.

 

 

9. --el_source

 

This option specifies which source should be used to create EurekaLog debug information. Default is .map file which should be in Borland-compatible format. Microsoft .map files are not supported. C++ Builder mode (see --el_mode switch above) regenerates .map file from .tds file (or injected TD32 info) - to complete .map file with line numbers.

 

Possible values are "" (empty string, default - use project's preferences), "MAP" (use .map file, default), "TDS" (use TD32), "PDB" (use PDF file), or "DBG" (use DBG file).

 

Warning: non-default values are experimental.

 

See this article to learn more about using --el_source.

 

Example

 

--el_source=MAP

 

--el_source=PDB

 

Note: this option is ignored when --el_prepare switch is used.

 

 

10. --el_injectjcl/--el_createjcl

 

These options will additionally inject JCL (JEDI Code Library) debug information directly into your executable (--el_injectjcl), or create an external .jdbg file (--el_createjcl). This option does not replace normal EurekaLog post-processing. I.e. JCL debug information is added over EurekaLog's own data.

 

JCL debug information is supported by modern IDE versions, thus it is very useful to add to your .BPL files (and any other DLL which may be loaded/used by IDE).

 

Example

 

--el_injectjcl

 

--el_createjcl

 

Note: these options are ignored when --el_prepare switch is used.

 

 

11. --el_createdbg

 

This option will create an additional .dbg file.

 

This option requires map2dbg.exe tool present in EurekaLog's \Bin folder. You have manually download this tool and copy it into \Bin folder of EurekaLog! Check the following locations:

 

DBG is debug information format supported by Microsoft. You can use this option when you need to work on your executables with Microsoft tools.

 

Example

 

--el_createdbg

 

Notes:

Only 32-bit executables are supported by this option.
This option is ignored when --el_prepare switch is used.

 

 

12. --el_verbose/--el_verbose_no_logs

 

These option instructs the EurekaLog compiler to produce more messages for debug purposes. If you have some strange issues with EurekaLog compiler - try to use this option to see what's going wrong.

 

Usually you don't need this option, it is used only for troubleshooting.

 

Example

 

--el_verbose

--el_verbose_no_logs

 

EurekaLog compiler will also create a few debug files. You can safely delete them if they aren't needed. They aren't used by EurekaLog and are generated only for debugging purposes. Those files are:

your-project_EL_debug.eof - contains a copy of injected options.
your-project.map_EL - contains a copy of injected debug information.

 

--el_verbose_no_logs option will not create additional log files.

 

Important Note: This option is limited in ecc32speed.exe. We recommend to use ecc32.exe/emake.exe for this option.

 

 

13. --el_gui_error

 

Shows errors in message boxes instead of writing them to the console. Optional.

 

Usually you want to add this switch, if you run compiler from IDE or other GUI tool. You probably don't want to specify it, if you run compiler from console or automated build script.

 

Note: EurekaLog compiler will set exit code (ERRORLEVEL) to non-zero value on any failure. Your build script can diagnose for success/failure compiles by analyzing process return code.

 

 

14. --el_priority

 

This option specifies class of process priority for ECC32/EMAKE. You can use any valid numeric value for process priority.

 

Example

 

--el_priority=$20

 

--el_priority=128

 

 

15. --el_nologo

 

This option suppresses standard ECC32/EMAKE's logo message with version and copyright information. You can use this option to get cleaner console output (for example, to redirect and analyze output).

 

This option does not affect actual processing of your project.

 

 

16. --el_nostats

 

This option suppresses writing compilation statistical information (such as sizes, times, etc.). You can use this option to get cleaner console output (for example, to redirect and analyze output).

 

This option does not affect actual processing of your project.

 

 


 

Examples

Some examples of full command lines:

 

Example 1

 

ecc32speed --el_alter_exe=Project1.dproj;.\Debug\Win32\Project1.exe

 

Example 2

 

emake --el_mode=Delphi --el_alter_exe=Project1.dproj;.\Debug\Win32\Project1.exe

 

Example 3

(for using in post-build event)

 

"C:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Packages\Studio16\ecc32speed.exe" "--el_alter_exe=$(PROJECTPATH);$(OUTPUTPATH)"

 

Example 4

 

ecc32 Project1.dpr "-UC:\Program Files (x86)\Neos Eureka S.r.l\EurekaLog 7\Lib\Win32\Release\Delphi7" -GD -$D+ -DEUREKALOG;EUREKALOG_VER7 --el_config=Project1_Debug.eof --el_verbose --el_gui_error

 

 

See also:




Send feedback... Build date: 2018-11-26
Last edited: 2018-06-14
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/command_line_options.php