Phobos problem - compilation

Nathan Reed nathaniel.reed at gmail.com
Thu Nov 22 13:58:00 PST 2007


Nathan Reed wrote:
> AnIHiL wrote:
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegQueryValueExA at 24
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegCloseKey at 4
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegQueryInfoKeyA at 48
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegCreateKeyExA at 36
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegOpenKeyExA at 20
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegOpenKeyA at 12
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegDeleteKeyA at 8
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegSetValueExA at 24
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegDeleteValueA at 8
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegFlushKey at 4
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegEnumKeyExA at 32
>> D:\D\dmd\lib\phobos.lib(registry)  Error 42: Symbol Undefined 
>> _RegEnumValueA at 32
> 
> These functions are in the Windows API, not part of phobos.  I guess you 
> need to link with some import libraries for user32.dll and/or kernel32.dll.

Oh and another thing, it looks like the functions are being name 
mangled, but the Windows API has a C interface, so the names shouldn't 
be mangled.  I guess the declarations of these functions also need to be 
wrapped in extern(C).  Maybe you are already linking with the right 
thing but it's not finding the functions due to the mangling issue.

Thanks,
Nathan Reed


More information about the Digitalmars-d-learn mailing list