custom block can't find a library

Permalink
I've been using concrete5 out-of-the-box for a bit, and have made my first foray into building a custom block. Got the basics down - woohoo - except now I want to put some meat on the bones. I have a library with some functions I want to use, and damned if I can find the right way to include the library if I just want to use the root/blocks and root/library directories... I found a couple of references to using a package, but it doesn't seem like I should *have* to use a package just to get my own block to talk to my own library.

I've tried:
include "mylib.php";

include ("libraries/3rdparty/mylib.php")

-- I also tried just plain libraries, but when the error message reports the path, it lists the 3rdparty dir so i thought i'd try that too
Loader::library('3rdparty/mylib');


I've dug all through the forums here and stackoverflow to no avail... the closest I found was someone with the same problemhttp://stackoverflow.com/questions/21235070/concrete5-library-not-b... but no answer :(

I hope I'm just missing something that someone's seen before - this can't be impossible! TIA.

ssdscott
 
goodnightfirefly replied on at Permalink Best Answer Reply
goodnightfirefly
Put 'mylib.php' in the root libraries directory, and load it via Loader::library('mylib')

If that fails, reply and attach your mylib.php file
ssdscott replied on at Permalink Reply
ssdscott
oh, the pains...

of course, when i moved the file into the root directory, it works fine. the lib is part of a package, which i had unzipped - INTO ITS OWN SUBDIRECTORY. the sub-directory didn't even register... i'm having flashbacks to seeing semi-colon's that aren't there :(

thanks for the explicit directions, which led to my "d'oh!" moment!
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Glad you got it working!