question

Upvotes
Accepted
7 3 5 5

Where to put default [EmaConfig.xml] file for C++ Linux?

Hi, I built executable file "Cons100" on Linux and ran it. The log file said "error reading configuration file [EmaConfig.xml]; file is empty". I see this file under RTSDK-2.0.1.L2.linux.rrg/Cpp-C/Ema/ directory by default. Is this the right place to hold this file?

elektronrefinitiv-realtimeelektron-sdktreprrtema-apic++linux
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
45.3k 103 44 60

@Xueying

Cons100 reads the EmaConfig.xml file from the current working directory. Therefore, to use the configuration file, you need to copy the configuration file to the working directory of Cons100.

However, you can override it by specifying the path when creating the OmmConsumerConfig instance.

OmmConsumer consumer( OmmConsumerConfig("/opt/refinitiv").host( "localhost:14002" ).username( "user" ) );

With the above code, EMA will load the EmaConfig.xml from the /opt/refinitiv directory.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.