Page 1 of 1

How do I compile multiple .uc files?

Posted: Sun Oct 10, 2010 1:24 pm
by Korneluk
I have usecode that has been tested individually and is working for NPC's and books. Now, I'd like to add them into Exult Studio all at once. One way would be to put each function into the same .uc file and compile that. However, I think that there is a way to leave all the .uc files separate and tell the compiler to fetch them and work its magic.
Is there a simple procedure that can be easily explained?
Is there a template that I can use?

Re: How do I compile multiple .uc files?

Posted: Sun Oct 10, 2010 7:30 pm
by Dominus
you can have a base usecode file and include different usecode files in that.

Code: Select all

#include "PathToUsecode.uc"
Or you can chain them on the command line, probably something like

Code: Select all

ucc -o usecode file1.uc file2.uc file3.uc
not sure though, but if you do a thorough search on this forum you are bound to find some pointers (just remember to search more dates than the last 30 days and eliminate "successful" :))

Re: How do I compile multiple .uc files?

Posted: Mon Oct 11, 2010 11:36 am
by Korneluk
I've seen what looks like the 'base' usecode file. I was hoping that somehow the compiler could be told to get all the .uc files if they are in one place....not that it would be difficult to add them together manually, but I imagined that it would be unwieldy somehow. Of course, I am aware that programs could be many hundreds(thousands!?) of pages before compilation. Perhaps I was worried I'd somehow burst into flames.
Thanks Dominus, I've seen examples of what you mentioned. I'll give it a try.

Fatal: Not able to open ./cache/production/data_global.php