Add CDT to IDE
Hello,
Is there any problem to add Eclipse CDT to to Crank Storyboard?
If no, would be interesting to update your doc to use Eclipse to build C/C++ callbacks libs instead of VS.
Regards,
Alain
-1
Hello,
Is there any problem to add Eclipse CDT to to Crank Storyboard?
If no, would be interesting to update your doc to use Eclipse to build C/C++ callbacks libs instead of VS.
Regards,
Alain
Comments
Hi Alain,
thanks for your post. Whilst Storyboard Designer is built as plug-ins for the standard Eclipse platform (we use gdt and ldt) it is not recommended to add an additional code framework as it may cause issues with the existing editor framework and we have not tested this configuration.
You are welcome to try it of course but we cannot offer support with this setup.
We are preparing an update to the formal documentation and sample code examples to show how the C Callback support, which we introduced with Storyboard 6.1 and Lite package, can be hooked-in to the simulation environment on the desktop environment for testing.
I have some preliminary information and an example that I could share however the exact mechanism depends on your desktop development environment.
Are you using iOS, Windows or Linux on the desktop and which toolchain for the C code?
Regards,
Garry
Hello Gary,
For the complete story, I'm evaluating Crank to potentially use it on our embedded systems.
First I wanted to write a little application suppose to work on Windows which generate a 'magic code' using vigenere encryption.
So I use the Application Export and it works weel. Anyway, it's really easy to find the Lua scripts and look at how it works so it's really not safe.
So I wanted to put the encryption function in C callback.
I tried to look at ClusterIO but it seems you changed it. The doc accessible from the IDE talks about C callback whereas the project example and the website docs seem to rely on a data bus (greio as far as I understood).
This solution is also very nice solution but it's not what I'm looking for in my case and so, I don't really know how to use the dll method.
Anyway, I also tried the provided clusterIO with mingw32 toolchain but I encounter a problem:
PS H:\Users\abonnefoy\storyboard_workspace\ClusterIO\source_code> mingw32-make.exe cc -DGRE_TARGET_OS_win32 -IH:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj/include -o cluster_update cluster_update.c -LH:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj/lib -lgreio
process_begin: CreateProcess(NULL, cc -DGRE_TARGET_OS_win32 -IH:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj/include -o cluster_update cluster_update.c -LH:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj/lib -lgreio, ...) failed. make (e=2): The system cannot find the file specified. mingw32-make: *** [Makefile:20: cluster_update] Error 2
In fact I don't really know if it's supposed to find libgree.dll, libgre.lib or libreio.lib
Regards,
Alain
Hi Alain,
no problem.
I have a modified ClusterIO sample project which implements one of the event handler callbacks 'cluster_update' as a C Callback loaded via an external DLL project built with Visual Studio 2017 as per here:
https://support.cranksoftware.com/hc/en-us/articles/360037766732-Example-C-Callback
On Windows this DLL should be built with the /MD (or /MDd for debug) flag to ensure the memory is passed safely.
I set the Linker -> Additional Library Directories:
C:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj\bin;C:\Program Files\Crank_Software\Storyboard_Engine\6.1.201910180336\win32-x86-opengles_2.0-obj\lib
I also added the Linker -> Additional Dependencies:
libgre.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies)
I am using Visual Studio 2017 (v141) with Windows SDK 10.0.16299.0.
Once built you need to pass-in the full path to the DLL containing your C Callbacks to the Storyboard engine at runtime on launch :
This functionality was introduced with Storyboard 6.1 and it looks like we will have a small change to re-align the API naming for Storyboard 6.2 onward (TBC):
If you find that there is an error reported by the ccallback plug-in on initialisation then it is likely that the DLLExport function is named incorrectly i.e:
I am debugging an error in my DLL code example currently and once I figure this out I can share the example with some more detailed documentation if it is useful...
Incidentally with Visual Studio you can debug the DLL code by attaching to the process 'sbengine.exe' allowing you to debug into the C Callback code.
I hope this helps you move along in the short term.
Regards,
Garry
Many thanks, I'll take a look at that ASAP.
Please sign in to leave a comment.