How to include a library file(.dll/.lib) on livecode and use the functions on the library file - livecode

I am new to Livecode and still learning on the language. I have some problem on how to use a function inside the library I created(a .dll file) and call it on my livecode stack.

Here a guide, it's a wiki and you can update it: https://livecode.fandom.com/wiki/Working_with_DLL

Related

Call a function of a .js library from an Office script

I'm trying Office Scripts.
I have a big .js file as a library, assume there is a function calc(x). I would like to be able to call this function from an Office script.
Does anyone know if it is possible? Does anyone know how to upload the .js library to Office Scripts?
If it is just a single .js file - as a temporary workaround, you can probably copy the whole thing and paste inside the Office Scripts code editor (you can put it before or after the main function). Then you can invoke calc(x) from inside main().
It's not ideal but might work.
Per this link they're not currently supported. (See the External Library Support section): https://learn.microsoft.com/en-us/office/dev/scripts/overview/code-editor-environment

How to compile Java code after DXL import?

Using the Domino/Notes API, when importing DXL design elements (for example a LotusScript agent), you have the option to either compile LotusScript code at the time of import, with DXLImporter.setCompileLotusScript(boolean flag), or leave the code uncompiled. If you leave the code uncompiled, then Domino will compile the code before first use. This is all fine with LotusScript.
Reading the API, I see no option for Java code. How can you compile Java code for use after importing from DXL programmatically?
(The question is not how you do it manually (like open every Java design element and save it to force compilation) but how it can be done programmatically)
You're going to need to do something along the lines of what the ODP to NSF compiler does https://frostillic.us/blog/thread.xsp?thread=NSF+ODP+Tooling. For obvious reasons (OSGi dependencies, Java library accessibility, builder processes etc) it's not a trivial task.

How to install the "sound" library for Processing in a simple way?

It's just so weird that Processing does't come with a "sound" library while the official information provides related information(https://processing.org/reference/libraries/sound/). This only leads me to the Github source code page(https://github.com/processing/processing-sound) and I literally do not know how to install this thing...
Yes, I could use the "Minim" or "Sonia" library. But I have a bunch of example programs which use the "sound" library, each with a "import processing.sound.*;" right at the beginning.
In addition, I can't find anything named "Sound" in the Processing library manager..
What's going on with this library? How do I install it easily?
update
I'm asking this because there is actually no option to install it:
Even when I search:
From your Processing PDE, go to the Sketch menu, then expand the Import Library submenu, and select the Add Library... option.
That will open up a dialog that lists libraries you can install, including the Sound library.
Install it, and you'll be able to use the classes in the processing.sound package.
You may download the .jar file of the library you need and put it in a folder named "code" in your sketch folder.
If you are using a Mac you can still add the library but it's a bit more complicated. You need to download the library and open the finder/documents/processing/libraries and drop the sound folder that you download from the web in the the libraries folder. You then open Processing and add the library through the library manager.

Vuforia: overlaying a texture onto a target instead of the teapot - problems with C++ file location

I'm trying to place a texture over a target in Vuforia (similar to this post), but am running into difficulty. I'm using Eclipse Luna, on Ubuntu 14.04.
So far I've done the following:
Installed the Vuforia Samples Project (with ImageTarget, Multi-Targets, User-defined targets, etc. in it) - this works find under normal Java environment.
Installed Android NDK, & setup directory in preferences.
I have added Android NDK support to the Vuforia samples project (via Android Tools menu)
I have built all.
Whilst the JNI directory appears, it only contains VuforiaSamples.cpp. I can't find ImageTargets.cpp as required in this tutorial.
Any ideas what I need to do? Thanks.
It turns out I didn't need to use the NDK. What I wanted to achieve was possible with Java alone.
To achieve this, take a look in the "...SampleApplications.util" package of the Java demo project and duplicate the "CubeObject", calling it something like "MyObject". You can then alter the geometry within this new object class.
To implement your new object class, take a look at the "...Render.java" file. In the rendering method you will see what code to replace with your own code.

Sandcastle, /doc, and Unmanaged C++

I work on a project that uses unmanaged visual C++ and a smattering of C#. We are trying to come up with a way to document our project, both the API reference, as well as some additional conceptual documents. Ideally, all of the documentation would live together in a .chm file that we could distribute with our product.
I was already familiar with Doxygen, as a long time C++ developer. Someone suggested that I look into Sandcastle as well, but I've run into a few snags.
From a number of other sources, including other posts on this site, it's well known that sandcastle does not support unmanaged C++. I did find a post that seems to indicate that you can still cram the C++ documentation into sandcastle, by adding the API reference as conceptual topics.
Using Visual Studio 2010, you can turn on the /doc option in the project settings for your unmanaged C++ project. This produces .XDC files which studio then compiles into an .xml file that goes along with your lib/dll/exe. Where I am stuck is that is unclear what exactly you can do with this xml file. Some pages I've found online suggest that you may be able to use this file for intellisense, but I've never seen that work in unmanaged C++. I was hopeful that I might be able to use this .xml file in Sandcastle Help File Builder somehow, but I can't find any examples of how that's done online, and every attempt I've made with SHFB has failed. It seems to only want MAML or HTML files if I want to add an existing conceptual help file.
So my question:
Is there a way to get my /doc generated .xml file into my SHFB help solution?
If not, what is the point of the /doc option for unmanaged C++?
Is there some kind of transformation I can do on my /doc generated .xml file to produce HTML or MAML which I could then import via SHFB?
Can this work, or should I just go back to Doxygen?
In theory, Sandcastle could be used to document unmanaged code but it would require a tool to produce the equivalent reflection data file that is currently produced by the MRefBuilder.exe tool for managed code assemblies. So far, nobody has done that to my knowledge.
I can't comment on the lack of IntelliSense for unmanged C++ since I don't use it anymore. At a guess, /doc is probably there for the managed code output assuming the same compiler is used but with a few extra command line options.
Using XSL to transform the XML comments to MAML is a possibility but, again, it's an option I'm not aware of anyone pursuing. My guess is that most opt to use Doxygen in this case since it's an established solution.
Eric
I have a similar situation. I need XML documentation in my C++/CLI bindings so .NET code can see them with Intellisense. But FYI, Visual Studio 2010 doesn't support XML documentation in native code:
https://msdn.microsoft.com/en-us/library/ms177226(v=vs.100).aspx
Visual Studio 2010
In Visual C++, you can add XML
documentation (triple-slash) comments to your source code and instruct
the compiler to output them to an .xml file. This file can then be
input to a process that creates documentation for the classes in your
code. The IDE for Visual C++ in this version does not support XML
comments in Intellisense.
That limitation was removed in Visual Studio 2013. However, it's still an annoying ecosystem to work with if you use templates in the native code (e.g. Boost libraries):
In the current release, code comments are not processed on templates or anything containing a template type (for example, a function taking a parameter as a template). Adding such comments will result in undefined behavior.
I found your question while searching for a way to temporarily disable the XML comment parser with a #pragma or #define when including such libraries.

Resources