How do I compile multiple .uc files?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Korneluk

How do I compile multiple .uc files?

Post 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?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How do I compile multiple .uc files?

Post 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" :))
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Korneluk

Re: How do I compile multiple .uc files?

Post 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.
Locked