oridb / mc

Myrddin Compiler
MIT License
387 stars 34 forks source link

Correctly invoke the linker when binding with C #163

Closed cbvi closed 6 years ago

cbvi commented 6 years ago

It looks like if the glue.c file is a lib in the bld.proj then dynlibs will be empty when calling linkcmd(), so the dynamic-linker flag doesn't get added.

This fixes the cbind-example which wasn't working.

cbvi commented 6 years ago

Also, the code https://github.com/oridb/mc/blob/master/mbld/deps.myr#L453 adds libraries from dynlibs to the cmd but as far as I can tell this can only happen if the glue.c file is added as a bin in the bld.proj, is this something that is expected?

oridb commented 6 years ago

The external libraries should also get recorded in usefiles. I think that this got lost in the mbld rewrite.

Fixed.