| |
| Posted by Marcel in reply to Mike Parker | PermalinkReply |
|
Marcel
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)
|