Thread overview
how do i fix undefined reference with betterC ?
4 days ago
test
4 days ago
Joakim
3 days ago
test
18 hours ago
Joakim
18 hours ago
Kagamin
18 hours ago
Kagamin
3 days ago
Kagamin
4 days ago
I am use betterC with pthread_attr_t and 1.12.0 (DMD v2.082.0, LLVM 7.0.0) for Android 64 in termux,  get this error:

undefined reference to `_D4core3sys5posixQk5types14pthread_attr_t6__initZ'

The same code in linux and macOS has no error ?
4 days ago
On Friday, 12 October 2018 at 02:27:35 UTC, test wrote:
>
> I am use betterC with pthread_attr_t and 1.12.0 (DMD v2.082.0, LLVM 7.0.0) for Android 64 in termux,  get this error:
>
> undefined reference to `_D4core3sys5posixQk5types14pthread_attr_t6__initZ'

beta1 or beta2? Cross-compiling or natively compiling?

> The same code in linux and macOS has no error ?

Are you using betterC on those other platforms too? I believe that's a druntime symbol that it's generating, which shouldn't be there for betterC. I'm able to reproduce this in Termux natively but not on linux/x64, could be a bug in betterC or an even longer-standing issue where the D frontend randomly puts out those symbols.

File an issue on github and we'll look into it:

https://github.com/ldc-developers/ldc/issues
3 days ago
On Friday, 12 October 2018 at 02:27:35 UTC, test wrote:
>
> I am use betterC with pthread_attr_t and 1.12.0 (DMD v2.082.0, LLVM 7.0.0) for Android 64 in termux,  get this error:
>
> undefined reference to `_D4core3sys5posixQk5types14pthread_attr_t6__initZ'
>
> The same code in linux and macOS has no error ?

You can just leave it uninitialized
pthread_attr_t attr=void;
You will need to call pthread_attr_init anyway.
3 days ago
On Friday, 12 October 2018 at 03:02:55 UTC, Joakim wrote:
> https://github.com/ldc-developers/ldc/issues

I use ldmd2-beta on my Galaxy Phone, use BetterC on destroy and android.

I am not sure how to reduct the code exmaple, if I can get a example will try open issue.

@Kagamin

Thanks for tips.
18 hours ago
On Friday, 12 October 2018 at 12:24:04 UTC, test wrote:
> On Friday, 12 October 2018 at 03:02:55 UTC, Joakim wrote:
>> https://github.com/ldc-developers/ldc/issues
>
> I use ldmd2-beta on my Galaxy Phone, use BetterC on destroy and android.
>
> I am not sure how to reduct the code exmaple, if I can get a example will try open issue.

It's okay, I filed an issue with my reproducible sample code:

https://github.com/ldc-developers/ldc/issues/2876

I was only able to reproduce with 64-bit ARM, not 32-bit. Same for you?

> @Kagamin
>
> Thanks for tips.

I confirmed that his workaround fixed this problem.
18 hours ago
pthread_attr_t is 5*size_t size, which might confuse initializer, but also has a gap on 64-bit.
18 hours ago
Oops, no, it's likely char[16], in C char sometimes means byte, not text.