Bassmod wrapper. - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: Bassmod wrapper. (/thread-9032.html)
Bassmod wrapper. - ugriffin - Jun 5, 2011 12:52 AM
I'm trying to write a bassmod wrapper. Challenges include passing arguments to it, as GM only passes real (I'm guessing it's double) and string arguments.
My 'test' bassmod app works perfectly, but the exact same code in a dylib doesn't... why?
RE: Bassmod wrapper. - SethWillits - Jun 5, 2011 02:05 PM
Could you explain what the actual problem is? Full errors etc
RE: Bassmod wrapper. - ugriffin - Jun 5, 2011 06:33 PM
Mainly... that when I actually try and test within Game Maker... nothing happens. No errors, but no activity either.
EDIT: Did you download the source? I'm still quite the newb when it comes to C, so something that I may have no clue about may be spotted by someone like you (with more experience) in a flash.
Calling a dylib from a dylib - ugriffin - Jun 7, 2011 10:56 PM
I know it's a bit of an odd question, but I've been trying to write a bassmod wrapper. A dylib that acts as an interface between bassmod (another dylib) and Game Maker.
I tested bassmod by writing a simple executable. I then proceeded to write my bridge dylib, but I found out the code didn't work. My original plea for help may be found here.
Therefore, I need to hunt for that bug. My idea is that the dylib is failing to start bassmod due to some functionality I'm not aware of, or something. The question is: how do I call a dylib from another dylib? I know that in executables it's simply a matter of dragging the library to XCode and it's linked automagically, but it doesn't seem to be the case with dylibs.
Any help is appreciated.
RE: Bassmod wrapper. - Skorche - Jun 7, 2011 11:54 PM
Quite seriously, I'm guessing that most people that know how to help you saw that you posted the code on a file hosting site. I got as far as the captcha when you posted it originally.
I did download it now, but it builds just fine. Attempting to run it requires GameMaker. You are the first Mac developer I've ever heard of that has used it. Finding people who know how to extend GameMaker is going to be very difficult.
RE: Calling a dylib from a dylib - Skorche - Jun 7, 2011 11:55 PM
dylibs can call other dylibs just fine. If there was a problem with loading it it should have had a nasty crash.
RE: Calling a dylib from a dylib - ugriffin - Jun 8, 2011 08:15 PM
(Jun 7, 2011 11:55 PM)Skorche Wrote: dylibs can call other dylibs just fine. If there was a problem with loading it it should have had a nasty crash.
That's really odd. Then why is not loading? Directory conflict?
EDIT: I've built other extensions for Mac, this is the first time I attempt the two-dylib combo, however.
RE: Bassmod wrapper. - Skorche - Jun 9, 2011 08:29 AM
From what I remember from writting Ruby extensions, when dynamically loading an extension it would either work or get a nasty crash because the freshly loaded lib couldn't find other dynamic symbols that it needed.
Presumably both that and GameMaker are using the dlopen API. Does your code not even run at all? Have you tried putting in logging statements?
RE: Bassmod wrapper. - ugriffin - Jun 11, 2011 11:13 AM
Yes, the code doesn't run at all. There should be console output... the problem is nothing happens.