<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>I am trying to make a function similar to genlib but which goes
recursively through folders to find .sci files, compile them and
put them in a given target build folder.</p>
<p>The idea is that I would like to be able to organize my 'macros'
folder while still being able to generate a library. In
particular, I would like to have that kind of folder organization
:</p>
<pre>- build
</pre>
<pre> <binary files should go here>
</pre>
<pre> <as well as names></pre>
<pre>- src
</pre>
<pre> - sub-folder1
</pre>
<pre> <.sci files>
</pre>
<pre> ...</pre>
<pre> - sub-folder n
- sub sub folder 1
<.sci files>
</pre>
<pre> < .sci files>
</pre>
<p><br>
</p>
<p>At the moment, the function (build.sce in the attached file) goes
through the folders contained in the initial 'src' folder,
performs an 'exec' on the .sci files that are found, and save the
corresponding binary files in the target folder 'build' (at the
same level as 'src'). It also generates a 'names' file containing
the names of the functions in the 'build' folder.</p>
<p>Finally, it creates a library with the binary files contained in
the 'build' folder.</p>
<p><br>
</p>
<p>Yet, when I try to use my functions, I get the following error:</p>
<p> !--error 999 <br>
Overloaded load cannot occur in this context <br>
</p>
<p>So I guess that there is something wrong with the way I generate
my library?</p>
<p>My binary files are generated as follows,<br>
</p>
<p> function_name = strsubst(fi,".sci","") // fi is the
full name of the file<br>
names_to_write = [names_to_write;function_name] // used
later to generate the file containing the names<br>
exec(file_path, -1) // file_path is the absolute path to
my function<br>
save(target_path + function_name + ".bin", function_name)<br>
</p>
<p>and the names file is generated as,</p>
<blockquote>
<p> names_file = target_path + "names"<br>
[fd, err] = mopen(names_file,"a")<br>
mputl(names_to_write, fd)<br>
mclose(fd)<br>
</p>
</blockquote>
<p><br>
</p>
<p>Best regards,</p>
<p>Pierre Vuillemin<br>
</p>
</body>
</html>