Re: Allegro 5 Wrapper Error
- Posted by Lone_EverGreen_Ranger Jul 12, 2013
- 1741 views
That "mt" in the DLL is a red flag to me. That usually stands for multi-threaded, which can lead to problems, since euphoria is single threaded (actually, non-Windows versions use threads for tasks, but it works like it's single threaded).
Agreed. You'll need to use the monolithic non-threaded library, e.g. allegro-5.0.7-monolith-md.dll
I am having a issue when trying to wrap Allegro 5. I have most of the library wrapped, but when I try to use it an example, I get this a machine-level exception occured during execution of this statement. Here's the code below
Hello Mr. Lone_EverGreen_Ranger, you should know that I have already started quite an effort on this front. It unfortunately has involved a custom "shim" DLL to wrap some functions in C for passing structures by value instead of by pointer (namely AL_COLOR values). So by all means, please continue my efforts if you'd like. I've laid out the library quite well and the code is all quite clean and simple. I made some good progress for a while but I've stalled out in the last few months. You can clone my Mercurial repository from here:
https://bitbucket.org/ghaberek/euallegro5
One thing that might be worth-while is upgrading all the DLL code to my euadvlib functions so I can eliminate all those nasty tests (t_allegro.e tests each function's ID manually). It would also allow better DLL debugging and for passing C strings back-and-forth.
-Greg
That's great Greg, although I'm almost done with my wrapper. Though I could look at yours and see, and perhaps compare the two. I'll see how it goes.