Bassmod wrapper.
Hey all,
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?
Source attached.
http://www.filedropper.com/slimemod
Thanks.
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?
Source attached.
http://www.filedropper.com/slimemod
Thanks.
Vetra Games: http://www.vetragames.com
My Blog: http://www.vetragames.com/blog/
Twitter: http://www.twitter.com/ugriffin
Could you explain what the actual problem is? Full errors etc
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.

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.
Vetra Games: http://www.vetragames.com
My Blog: http://www.vetragames.com/blog/
Twitter: http://www.twitter.com/ugriffin
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.
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.
Vetra Games: http://www.vetragames.com
My Blog: http://www.vetragames.com/blog/
Twitter: http://www.twitter.com/ugriffin
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.
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.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
dylibs can call other dylibs just fine. If there was a problem with loading it it should have had a nasty crash.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
(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?
Ugh.
EDIT: I've built other extensions for Mac, this is the first time I attempt the two-dylib combo, however.
Vetra Games: http://www.vetragames.com
My Blog: http://www.vetragames.com/blog/
Twitter: http://www.twitter.com/ugriffin
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?
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?
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Yes, the code doesn't run at all. There should be console output... the problem is nothing happens.
Vetra Games: http://www.vetragames.com
My Blog: http://www.vetragames.com/blog/
Twitter: http://www.twitter.com/ugriffin

