Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread zjh via Digitalmars-d-learn
On Tuesday, 29 November 2022 at 01:08:03 UTC, zjh wrote: ... ```d [Environment64] LIB=%@P%\..\lib;%lj%\dku; ```

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread zjh via Digitalmars-d-learn
On Monday, 28 November 2022 at 16:21:20 UTC, NonNull wrote: Any idea what may be going on with dmd? use `sc.ini` like this: ```d [Version] version=7.51 Build 020 [Environment] lj=E:\path DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-I%lj%\dimport" LIB="%@P%\..\lib"

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread NonNull via Digitalmars-d-learn
On Sunday, 27 November 2022 at 17:26:37 UTC, NonNull wrote: I worked around this by setting a LIB environment variable containing the extra path I needed, so I didn't need the pragma. But this only worked for ldc2; dmd still complained it cannot find the necessary, ignoring the LIB environment

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread NonNull via Digitalmars-d-learn
On Monday, 28 November 2022 at 14:41:01 UTC, Adam D Ruppe wrote: This is the Microsoft doc page for the feature the pragma uses: https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?source=recommendations=msvc-170#linker It looks like they actually removed some options in the

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 28 November 2022 at 14:19:46 UTC, NonNull wrote: double quotes whatsoever into the linker command line via pragma(linkerDirective,_). linkerDirective doesn't add things to the linker command line at all. https://dlang.org/spec/pragma.html#linkerDirective "Implementation Defined:

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-28 Thread NonNull via Digitalmars-d-learn
On Sunday, 27 November 2022 at 17:37:50 UTC, kinke wrote: For LDC, you shouldn't need any double quotes, the compiler quotes the linker flag if it contains spaces. In fact I cannot find any way (multiple double quotes, escaped double quotes, different combinations of these) to get any double

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-27 Thread NonNull via Digitalmars-d-learn
On Sunday, 27 November 2022 at 17:37:50 UTC, kinke wrote: For LDC, you shouldn't need any double quotes, the compiler quotes the linker flag if it contains spaces. Didn't work for me with LDC: This, which works at the command line with ```-L=```: ```enum LIBPATH = `/LIBPATH:"C:\Program Files

Re: pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-27 Thread kinke via Digitalmars-d-learn
For LDC, you shouldn't need any double quotes, the compiler quotes the linker flag if it contains spaces.

pragma(linkerDirective,_) removes double quotes, dmd ignores LIB

2022-11-27 Thread NonNull via Digitalmars-d-learn
Hello, using dmd 2.100.2 and ldc2 1.30.0, compiling to 64-bits, Windows 10. pragma(linkerDirective,_) strips double quotation marks, so how can a linker command line like /LIBPATH:"Path/containing spaces/to/needed/libs" be passed on to the linker via this pragma? Is this a bug? Note: the