Preferred location of globally available soft declares?

My dylib/dll API will have dozens – maybe hundreds – of C-API functions / subroutines. Which is canonical or preferred in Xojo: to place all of these soft declares in a single module, or place the declarations at the head of Xojo code that references those calls?

Normally, one declaration point is a good idea – especially if the API changes (as it will want to do during development). But I’m asking because I’m not familiar with the build / link process of a Xojo executable, and how efficient the compile / link process is.

Do what makes it easy for you to work with

And, as I said in the other thread, a plugin may in fact be simpler since its all C/C++ and then in Xojo you can just use it as if the plugin function are normal parts of the language

See Extras > PluginsSDK > Examples where there are a few you can examine

@Norman Palardy – I’ll review the plugin API, for sure.

This is going to sound like a Total Newb Question but – let’s say I wanted to have one “Module” that contains all the soft declares – which of the many possible items do I “add” to that Module that will allow me to just enter the free-form textual soft declares?

Add them as an External Method. That makes them globally available in your app. Another approach would be to create a set of classes that model your API and encapsulate the declares inside them.

@Tim Hare – But if I add each of them as an External Method – that’s a lot of individual work to add hundreds of API calls – if I wanted to write up a Xojo source code document that JUST contains all the soft declares, how can add a module / file that JUST contains those (without, for example, defining a class – which I don’t need to encapsulate those calls).

Short of writing a code generator that reads your list of API functions and spits out a Xojo module file in XML or Plain Text, which you can then drag and drop into your project, I don’t think there’s a way around doing them one at a time. In the old IDE, you could paste the entire function definition into the function name field and it would parse out all the details and stick them into the correct fields. I don’t know that the new IDE does that.