OS X : Allowing linking to .dylib

BlitzMax Forums/BlitzMax Module Tweaks/OS X : Allowing linking to .dylib

Brucey(Posted 2007) [#1]
bmk is currently crippled on Mac in that it doesn't allow you to use the "-l" import option, where it instead adds anything with "-l" to the filelist, rather than as part of the command-line arguments for the compile.

On linux you can use something like :
Import "-lssl"

to link to the libssl.so shared object.

On Mac, you would have a libssl.dylib shared object, but you will get an error if you use the above Import saying that it cannot find the file "-lssl"...

The fix... ;-)

In bmk_util.bmx, change line 217 from
If opt_dumpbuild Or (t[..1]="-" And t[..2]<>"-l")

to
If opt_dumpbuild Or t[..1]="-"


and recompile bmk (with debug off, and non-GUI), and replace the bmk in the bin folder (probably backup your original first!!)

Job done :-)


SebHoll(Posted 2007) [#2]
Thanks Brucey - sorry to bring this up, but I've got a lovely bug report for you over on the Linux forum, that's crippling my Linux progress at the mo'. Could you please have a look at it if you get some time? There's definitely a free copy of Max'd GUI for you when it is released for all the help you've given me! ;-)


Brucey(Posted 2007) [#3]
Noted, Mr Seb. Been a bit engrossed in my latest (svn mod) project over the last week and a bit, but as I've now got it running great on Linux and Mac (using this tweak - and keeping the post on-topic), I guess I could take a break from it for a moment ;-)