need help with Windows CreateNamedPipe Security attributes process with undefined symbols at compile time

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 1 06:44:47 PST 2015


On 02/12/15 3:40 AM, Jonathan Villa wrote:
> On Tuesday, 1 December 2015 at 05:26:25 UTC, Nicholas Wilson wrote:
>
>> What is causing this: Is this a compile or a linker error?
> this is the real output of the error:
> Building Debug\ASI.exe...
> OPTLINK (R) for Win32  Release 8.00.17
> Copyright (C) Digital Mars 1989-2013  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> Debug\ASI.obj(ASI)
>   Error 42: Symbol Undefined _SetSecurityDescriptorDacl at 16
> Debug\ASI.obj(ASI)
>   Error 42: Symbol Undefined _InitializeSecurityDescriptor at 8
> Building Debug\ASI.exe failed!
>
>> is the cast necessary?
> I tried without the cast and it throws me a compile error, so I made the
> cast.
>
>
>> you want toStringz(pipename) or if you know pipename is a null
>> terminated string pipename.ptr
> Thanks for your advice, I'm very noob with D so I downloaded the new
> book that came out that can be free. It's supposed that the name will
> come in the arguments (I've not written that yet, I did just put some
> basic string "pipechanneltest" <-string literal.
>
>
>> pragma(lib ,"advapi32");
>> it may also require the appropriate file suffix (.dll or .lib)
> Yes, I wrote it with comma, it was just a typo error.
> advapi32.lib I found it in my DMD installation folder (dmd2/windows/lib)
> (62.5K), same as kernel32.lib (106K).
> Can I use .lib files from my Windows SDK? it's heavier (189K).
>
> I wrote after the pragma(lib ,"kernel32"); the following line:
> pragma(lib, "advapi32.lib");
> I tried without file suffix and with .dll suffix and it failed in all
> cases.
>
> MAN! what the heck? I changed the build from x86 to x64 and there's no
> more errors. Even without the new pragma line. Either way I would prefer
> x64 over x86.

Different linker, different defaults.
-ms32coff probably will also work :)

It all comes down to the old import libs for system libraries that comes 
with dmd for 32bit.


More information about the Digitalmars-d-learn mailing list