Linker cannot find malloc and free on OS X

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 4 09:13:22 PDT 2017


On 2017-06-04 12:45, Nordlöw wrote:
> My gmp-d tests successfully on Linux as
>
> dub test
>
> but on OS X it fails as
>
> Undefined symbols for architecture x86_64:
>   "free", referenced from:
>   ...
>   "malloc", referenced from:
>   ...
>
> Any ideas on why?
>
> https://github.com/nordlow/gmp-d/issues/4#issuecomment-305974761

I would recommend adding the --verbose flag to see the exact commands 
invoked. That will print how the D compiler was invoked. The copy-paste 
the exact command and add the -v flag (for verbose). To the same with 
the C compiler and the linker.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list