module .a library path
BlitzMax Forums/BlitzMax Programming/module .a library path
| ||
I have this extract at the top of my main module file ModuleInfo "LD_OPTS: -LD:\BlitzMax\mod\srs.mod\project.mod" Import "-lsomelibrary" This is so that the compiler can find any lib***.a files in that folder. The problem is that the filepath is hard coded. Is there a way so that I can don't have to use a hard coded filepath? Obviously not everyone has BlitzMax installed in the same place. Many thanks. |
| ||
Maybe I misunderstood what you are asking, but if you are in Linux and installed the development library through the software centre, you only need to do this:?Linux Import "-libirrlicht" ? If you have installed using this method, that should be all that is needed. apt-get install libirrlicht-dev Am I understanding you correctly? I dont know what hardcoding is, but you should just be able to change file permissions? Sorry if I wasn't any help. |
| ||
I'm never very good at describing what i mean on the first attempt :D hard coded = a hand coded fixed filepath, which is bad, very bad - Notice I have the LD_OPTS parameter as a fixed file path... while it works for my system, if someone else uses my module and they have BlitzMax installed at a different filepath ( more than 99% likely ) then it wont compile. Oh, I'm using Win8, and the .a file is stored at the filepath in the modules folder which is specified in the ModuleInfo above. When compiling on a windows machine Blitzmax looks in the Blitzmax\lib folder for any .a files that are Import'ed, unless you tell the compiler/linker otherwise ( by using the ModuleInfo LD_OPTS or CC_OPTS ). |
| ||
try:ModuleInfo "LD_OPTS: -L%PWD%/lib" http://www.blitzbasic.com/Community/post.php?topic=85854&post=972039 |
| ||
Thanks Zeke, thats done it. And thanks to Brucey too. |