Thu Jul 18, 2019 11:49 am
Login Register Lost Password? Contact Us


client tools to compile multi ecl files

Comments and questions related to the Enterprise Control Language

Tue Dec 11, 2018 4:05 pm Change Time Zone

I have two ecl files:

1. helloWorld.ecl
EXPORT helloWorld() := MODULE
export add1(integer a1, integer a2) := function
a := a1 + a2;
return a;
end;
END;

2. callHW.ecl
a := helloWorld().add1(5,6);
output(a);

I used the command: eclcc helloWorld.ecl callHW.ecl -E
I got the archive:
<Archive build="community_7.0.2-1"
eclVersion="7.0.2"
legacyImport="0"
legacyWhen="0">
<Query attributePath="helloWorld"/>
<Module key="" name="">
<Attribute key="helloworld"
name="helloWorld"
sourcePath="/opt/HPCCSystems/7.0.2/clienttools/bin/helloWorld.ecl"
ts="1544543862000000">
EXPORT helloWorld() := MODULE

export add1(integer a1, integer a2) := function
a := a1 + a2;
return a;
end;

END;&#9;&#32;&#10;
</Attribute>
</Module>
</Archive>

this archive only includes helloWorld.ecl, but without callHW.ecl. I can't figure out the reason and how to correct it. Any help? thank you.
jfeng@ln
 
Posts: 3
Joined: Tue Nov 27, 2018 3:26 pm

Wed Dec 12, 2018 9:31 am Change Time Zone

When creating an archive (or compiling a query) you only need to include the main file that is used for the query on the command line. eclcc automatically includes any other files that are referenced.

So:
eclcc callHW.ecl -E

should create the archive containing everything.
ghalliday
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 184
Joined: Wed May 18, 2011 9:48 am


Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest