Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10
tcak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 16 22:55:55 PDT 2016
On Sunday, 16 October 2016 at 22:36:15 UTC, Nordlöw wrote:
> On Sunday, 16 October 2016 at 22:00:48 UTC, Nordlöw wrote:
>> Which flag(s) in `src/posix.mak` did you change?
>
> Does
>
> make -f posix.mak MODEL_FLAG=-fPIC
>
> work?
>
> I'm sitting on a 16.04 system right now (which I don't dare to
> upgrade until this is fixed) so I'm just guessing.
Well, I haven't made any changes anywhere at all. I always
download the deb file and install it. My program was compiling on
16.04, and wasn't compiling on 16.10.
So, I added
-defaultlib=libphobos2.so -fPIC
while compiling. That's it. But as you can guess, now I have to
copy the libphobos on other computers as well as the executable.
(libphotos2.so.0.71 is 9 MiB)
More information about the Digitalmars-d-learn
mailing list