Linker can't link functions from advapi

Deen O'Connor deen.oconnor at yandex.ru
Mon Apr 1 19:08:04 UTC 2019


On Monday, 1 April 2019 at 15:33:46 UTC, Bastiaan Veelo wrote:
> I would advise against using optlink, make sure your object 
> file format is COFF. I can recommend setting up your project 
> for dub[1]. All I had to do is add this to dub.json:
>
>  	"libs": [
> 		"Gdi32",
> 		"Comdlg32",
> 		"Winspool",
> 		"Ws2_32",
> 		"wntab32x",
> 		"User32"
> 		],
>
> and compile with `dub build -a=x86_mscoff` for 32bit or `dub 
> build -a=x86_64` for 64bit. It just works. Granted I also have 
> this in dub.json
>
>   	"lflags-x86_mscoff": ["/NODEFAULTLIB:LIBC.lib"]
>
> but I believe that is necessary because of some other libs that 
> we link with.

That didn't work. Linking failed with code 1120 with the same 
errors as before.




More information about the Digitalmars-d mailing list