| |
![Marcel's Gravatar profile Gravatar of Marcel](//www.gravatar.com/avatar/a35f43bcc234ed215f2bfe47e2ecf433?d=identicon&s=32) | Posted by Marcel in reply to Mike Parker | Permalink Reply |
|
Marcel ![Marcel's Gravatar profile Gravatar of Marcel](//www.gravatar.com/avatar/a35f43bcc234ed215f2bfe47e2ecf433?d=identicon&s=80)
Posted in reply to Mike Parker
| On Sunday, 8 December 2019 at 19:36:40 UTC, Mike Parker wrote:
> Struct destructors should work in betterC. It would be helpful if you can paste the errors.
extern(C) void main()
{
auto pool = ObjectPool!(int)(100);
auto a = pool.Acquire;
pool.Release(*a);
}
This code generates the two following errors:
1>Test.obj : error LNK2019: unresolved external symbol _d_enter_cleanup referenced in function "?dtor$5@?0?"ref Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array.opAssign(const(Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array))" (_D11Collections6Arrays__T5ArrayTSQBf11ObjectPools__T10ObjectPoolTiTS6Memory10Allocators16DefaultAllocatorZQCc5EntryTQBxZQDr8opAssignMFNcxSQFgQEw__TQEsTQEpTQDkZQFeZSQGgQFw__TQFsTQFpTQEkZQGe)@4HA" (?dtor$5@?0?"ref Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array.opAssign(const(Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array))" (_D11Collections6Arrays__T5ArrayTSQBf11ObjectPools__T10ObjectPoolTiTS6Memory10Allocators16DefaultAllocatorZQCc5EntryTQBxZQDr8opAssignMFNcxSQFgQEw__TQEsTQEpTQDkZQFeZSQGgQFw__TQFsTQFpTQEkZQGe)@4HA)
1>Test.obj : error LNK2019: unresolved external symbol _d_leave_cleanup referenced in function "?dtor$5@?0?"ref Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array.opAssign(const(Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array))" (_D11Collections6Arrays__T5ArrayTSQBf11ObjectPools__T10ObjectPoolTiTS6Memory10Allocators16DefaultAllocatorZQCc5EntryTQBxZQDr8opAssignMFNcxSQFgQEw__TQEsTQEpTQDkZQFeZSQGgQFw__TQFsTQFpTQEkZQGe)@4HA" (?dtor$5@?0?"ref Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array.opAssign(const(Collections.Arrays.Array!(Collections.ObjectPools.ObjectPool!(int, Memory.Allocators.DefaultAllocator).ObjectPool.Entry, Memory.Allocators.DefaultAllocator).Array))" (_D11Collections6Arrays__T5ArrayTSQBf11ObjectPools__T10ObjectPoolTiTS6Memory10Allocators16DefaultAllocatorZQCc5EntryTQBxZQDr8opAssignMFNcxSQFgQEw__TQEsTQEpTQDkZQFeZSQGgQFw__TQFsTQFpTQEkZQGe)@4HA)
|