std.allocator ready for some abuse

Jack Applegame japplegame at gmail.com
Sat Nov 16 02:50:29 PST 2013


Passing -g flag to the linker causes a linker error on win32.
Very simple program:

import std.allocator;
void main() {}

Compilation commands:

dmd.exe -g -debug -c std/allocator.d -ofallocator.obj
dmd.exe -g -debug -c main.d -ofmain.obj
dmd.exe out.exe -g allocator.obj main.obj

Output:

dmd.exe out.exe -g allocator.obj main.obj
OPTLINK (R) for Win32  Release 8.00.13
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
allocator.obj(allocator)
  Error 42: Symbol Undefined __aligned_malloc
allocator.obj(allocator)
  Error 42: Symbol Undefined __aligned_free
allocator.obj(allocator)
  Error 42: Symbol Undefined __aligned_realloc
--- errorlevel 3

Without -g flag on the last command (dmd.exe out.exe 
allocator.obj main.obj) no linker error appears.


More information about the Digitalmars-d mailing list