Bixby Sayz Posted June 10, 2013 Share Posted June 10, 2013 Having a brain dead moment. Trying to get SCAR 3.39 to load a library relative to the includes directory but SCAR doesn't seem to want to find it unless I hard wire in the full complete path. Trying to load file <IncludesPath>\OSI\SMART\SmartRemote.dll: [sCAR]program New; {$L OSI\SMART\SmartRemote.dll} begin end.[/sCAR] Quote Link to comment Share on other sites More sharing options...
slacky Posted June 10, 2013 Share Posted June 10, 2013 (edited) I do not have any way to test the following suggestion (ATM), and I have never needed to do what you do, but try using a relative path based on the "." which represents current dir (in most cases). [sCAR] program Untested; {$L .\OSI\SMART\SmartRemote.dll} begin end.[/sCAR] If you are not loading from OSI-folder, you must append "Includes/OSI/" to the path first (but that you already know), so I assume you're loading from OSI-base folder. Edited June 10, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 10, 2013 Author Share Posted June 10, 2013 Yeah I tried that. The includes directive {$I} works fine automatically relative to the includes directory. The load library directory {$L} works fine relative to the current include file. BUT if doing this directly from a script it seems to just get totally confused on where to look. Quote Link to comment Share on other sites More sharing options...
slacky Posted June 10, 2013 Share Posted June 10, 2013 (edited) Now I see what you wish (load lib from a script?)... The default Plugin directory is specified as current path when using {$L ..} So you need to do: [sCAR] program Untested; {$L ..\Includes\OSI\SMART\SmartRemote.dll} begin end. [/sCAR] Edited June 10, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 10, 2013 Author Share Posted June 10, 2013 Clever. Thank you. Quote Link to comment Share on other sites More sharing options...
FHannes Posted June 10, 2013 Share Posted June 10, 2013 I believe I constructed the system to try to find the file in 3 places, as it does for the $I directive. Given the path isn't absolute, it tries to find it relative to the script's directory, then the script file it's in and then the libraries folder. Though I'm not sure it's in that order, first 2 might be switched. Quote Link to comment Share on other sites More sharing options...