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.

 

Important Note: usually, you call ecc32.exe/emake.exe from [EurekaLog installation folder]\Packages\[IDE name]\ folder or from \bin folder of your IDE. That way ecc32.exe/emake.exe will know which IDE you are using. However, if you are calling ecc32.exe/emake.exe from \bin folder of EurekaLog, or if you copy ecc32.exe/emake.exe to another folder - then it will NOT know which IDE you are using. You have to supply --el_ide command line switch (see below) to indicate what IDE should be used.

 

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

 

Notes:

EurekaLog-specific options switches are not passed to default dcc32.exe and make.exe compilers.
EurekaLog-specific 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.
For backward compatibility: 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 the option:

 

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

 

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. If you need to include double-quote symbol inside command line argument - escape it as \q. For example:

 

ECC32AdditionalOptions="--el_source=TDS \q--el_config=C:\\Test Project\\Options.eof\q"

 

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 a 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 settings. 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.exe/make.exe) and assign this task to someone else (such as IDE, FinalBuilder, etc.).

 

Delphi Example (Delphi 5-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=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 EurekaLog's settings 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 build configurations, because EurekaLog may not know which build configuration to use.

 

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

 

 

3. --el_buildconfig

 

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

 

Build configuration 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 build configuration name will load EurekaLog configuration from the corresponding Project1_BuildConfigurationName.eof file instead.

 

Example

 

--el_buildconfig=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 settings than settings which are stored in the project itself (or build configuration).

 

Example

 

--el_config=..\Options\VCLForms.eof

 

See also: how to get .eof file.

 

By default EurekaLog uses EurekaLog settings from project base settings file (e.g. Project1.eof). It also respect external settings option. You don't need to use this option if you want to compile your EurekaLog-enabled project (because your typical project settings will be used automatically). You only need to use this option when your project does not contain EurekaLog settings; 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 the base settings file (Project1.eof). You may want to specify project ID manually when using external settings (e.g. using --el_config option), sharing configurations between projects, or if you simply have a 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 the project ID. Or you may copy the 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.exe 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 determined 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 are calling ecc32.exe/emake.exe/ecc32speed.exe from another 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.exe/make.exe,

 

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 with Microsoft compilers. This option is also useful if you are using 3rd party tool chain for RAD Studio IDE. For example, you may want to use UniLink (ulink.exe) with C++ Builder. You may want to use --el_source=TDS in that case.

 

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_strip

 

This option will strip embedded non-EurekaLog debug information (such as TDS/TD32, DWARF, etc.) from the specified executable.

 

Example

 

--el_strip=Project1.exe

 

It is useful, if you plan to distribute the file to your end users. In that case you want your file have EurekaLog and EurekaLog's debug information, but do not need other debug information, which you are likely to use during debugging from IDE. Passing the file through ecc32/emake with this option will remove (strip) debug information in formats like TDS/TD32, DWARF, etc. We recommend to do that for production (e.g. Release build configuration).

 

Notes:

This option is not a modifier! It is standalone processing mode. E.g. if you want to remove embedded debug information during post-processing - do not use this option, use the "Strip non-EurekaLog debug info" option instead;
For this reason, this option can not be combined with most other options, including (but not limited to) --el_prepare, --el_alter_exe, --el_target, --el_mode, --el_compiler, --el_source, etc;
Removing embedded non-EurekaLog debug information may significantly decrease size of a compiled executable, because EurekaLog will remove very large debug information data block. Please note that you may lose ability to debug your executable in your IDE (local debugging). Using this option on EurekaLog-enabled applications should not change/affect behavior of EurekaLog, because EurekaLog uses its own debug information format (by default);
Do not use this option if you are using EurekaLog with disabled EurekaLog debug information - e.g. when the "Debug information" option is set to the "Do not add/inject EurekaLog debug information" value. Otherwise EurekaLog will have no debug info to work with;
Consider disabling additional debug info providers if you plan to use this switch.

 

 

13. --el_wait

 

Specifies timeout in seconds. Default is 60. This timeout is used by EurekaLog to wait for executable file to become unlocked for writes. This feature is used to workaround anti-viruses locking compiled executable.

 

Example

 

--el_wait=120

 

The value of 0 indicate that EurekaLog should not wait for executable to become writable and fail immediately.

 

 

14. --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.

 

 

15. --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.

 

 

16. --el_priority

 

This option specifies class of process priority for ecc32.exe/emake.exe/ecc32speed.exe. You can use any valid numeric value for process priority.

 

Example

 

--el_priority=$20

 

--el_priority=128

 

 

17. --el_nologo

 

This option suppresses standard ecc32.exe/emake.exe/ecc32speed.exe'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.

 

 

18. --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: 2023-09-11
Last edited: 2023-08-08
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