Volumes.mod: can't find interface

BlitzMax Forums/Brucey's Modules/Volumes.mod: can't find interface

Adam Novagen(Posted May) [#1]
Alright. Wit's end again.

All I need is one simple thing: to get the %APPDATA% environment variable. God, I miss SystemProperty(), this used to be so simple. Anyway, after a good deal of searching, I found out about volumes.mod, which provides the GetUserAppDir() command that I need here.

Problem is, I cannot for the life of me install it and get it working. Here's the situation: I'm using BLIde, Win7 x64. I downloaded Brucey's full module library from Github (a site which I still, to this day, have not properly figured out) as a ZIP. Went into the ZIP, grabbed the volumes.mod folder, copied it to the bah.mod folder in the BlitzMax\mod directory. So far so good; I'd been using Brucey's GME audio library already, which is why I had the bah.mod directory. This has been (and still is) working fine.

Open MaxIDE because I couldn't remember where the "build modules" option is in BLIde. Build the modules. Rebuild documentation. Completed, success, good to go. Check documentation from within BLIde, everything seems to be installed and working. Import the module with Import bah.volumes, looking good, GetUserAppDir() is being correctly coloured by the syntax highlighting, run program, and... "Can't find interface for module 'bah.volumes'."



What?? Granted, I have virtually no clue when it comes to modules, but I'm pretty sure that this shows it's installed and should be fully operational. Long story short, I've tried multiple variations of module building, both from within MaxIDE and BLIde. The old LibGME that I was using (specifically GMEOpenAL) is still working just fine, but BMax refuses to recognize volumes.mod, even in the included examples. Literally even the simplest one:

SuperStrict

Framework bah.Volumes
Import BRL.Standardio

Print GetUserAppDir()


Still causes the "could not find interface" error. I don't get it; what am I missing here?


Brucey(Posted May) [#2]
The folder "mod.bak" looks like a problem. It should be just "mod" ... so : BlitzMax/mod/bah.mod/volumes.mod

Then you need to build modules. You can do this on the commandline, from the BlitzMax/bin folder :
cd C:\BlitzMax\bin

bmk makemods -a bah.volumes

If that doesn't appear to do anything (you should see it compiling everything), then either the module folders still aren't correct, or your MinGW isn't set up correctly.


Adam Novagen(Posted May) [#3]
Ah yes, I took the screenshot from within a backup directory I made before I tried installing your full module library. The original \mod folder is exactly like this though.



If it's a MinGW issue, how would I go about checking this? I thought I had it set up properly, but it's been so damn long since I touched it (back when I installed the GME modules in like 2012) that I have no idea what state it's in. Let me try a command line build just in case that turns up anything more specific.


Adam Novagen(Posted May) [#4]
Well that's bizarre. I just repeated the original process and it now works perfectly; the only difference is having compiled from command line instead of from MaxIDE.

Like, here's what I did this time. First, I restored a backup (I keep backups of freaking EVERYTHING) of the \mod directory that I had taken when I last installed LibGME:



Then, I re-copied volumes.mod:



Contents for reference (this is from the exact same ZIP file I used to begin with):



I compiled from command line, the only thing different from before:



The contents of volumes.mod updated to look exactly like they had the first time:



BLIde, also, seems to agree with the mod's presence... Just like it did before:



Business as usual on the code side of things:



And yet... This time, magically, it worked. The results of literally every step of this process looked exactly like my first attempt; the only difference was building the module alone, from the command line, instead of building all modules from MaxIDE. Any idea why that might've messed up in the first place?

At any rate, I feel like the early inventors of RADAR. No freaking idea how it's working, but secure in the knowledge that it is. Thanks Brucey. Footnote: deleting the broken bah.mod directory to reinstall the backup involved removing some 36,000 files. I don't think I'll ever fathom how you found the time (or energy) to create all that. Hats off.


col(Posted May) [#5]
Hi Adam,

Any idea why that might've messed up in the first place

It looks like your MaxIDE is set to build 'multithreaded'.
And I guess you then used BLIde to build non-threaded. Explains why it couldn't find the interface.


BlitzSupport(Posted May) [#6]

All I need is one simple thing: to get the %APPDATA% environment variable.



Quick alternative with system call:

Print getenv_ ("APPDATA")

' Note no % signs either side...



Adam Novagen(Posted May) [#7]
Dear god in heaven I wish I'd known that this morning, hahah. On the plus side though, it got me some more experience with module building, so in a roundabout way I'm glad things happened the way they did. Will definitely use the simple options in the future though.

As always, I'm enormously grateful for the fact that there are so many old faces around here that are still more than willing to lend a hand, especially since I only come around here about once every six months when I'm completely desperate. You lot are the best.


BlitzSupport(Posted June) [#8]
I don't think it's documented anywhere, but is used by core modules. You're right, though, it's good to go through using modules too... I just found out yesterday that I could be using Brucey's libxml module instead of the pain of Python and BeautifulSoup!