Re: dynamic linker flags with dub

2024-04-29 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
I achieve this with dub? Is there a way to inject variables into the linker flags? E.g. something like this in the dub.json: "lflags-windows-ldc": ["/PDB:foo_%random%.pdb"] Your best bet probably is to use dub as a library, and change your ``targetName`` or ``targetPath``

Re: macOS Sonoma Linker Issue

2024-01-21 Thread Renato via Digitalmars-d-learn
dub build`` This did work! Thanks. Any update on fixing the linker issues so that such workarounds won't be needed?

Re: macOS Sonoma Linker Issue

2024-01-20 Thread ryuukk_ via Digitalmars-d-learn
have to rebuild _all_ packages. So clear your dub cache. I think point 2 is causing your issues. -Johan Hi again, I hate to repeat myself, but the linker issues on MacOS keep happening, even after using this in the dub recipe: ``` lflags "-ld_classic" ``` Even though this helps,

Re: macOS Sonoma Linker Issue

2024-01-20 Thread Renato via Digitalmars-d-learn
think point 2 is causing your issues. -Johan Hi again, I hate to repeat myself, but the linker issues on MacOS keep happening, even after using this in the dub recipe: ``` lflags "-ld_classic" ``` Even though this helps, every now and then I am faced with a horrible error like this

Re: macOS Sonoma Linker Issue

2024-01-06 Thread Renato via Digitalmars-d-learn
dub allow specifying not just the OS and architecture, but the OS version?? Probably not , right? This linker issue is such a messy problem to have.

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
On Friday, 22 December 2023 at 17:50:47 UTC, Johan wrote: Some general advice: 1 - use `dub` from LDC's package (this may solve some arm64 vs x86 issues when on Apple Silicon CPU) ``` ▶ which dub /Users/renato/dlang/ldc-1.35.0/bin/dub (ldc-1.35.0) ``` 2 - when you use a new or different

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Sergey via Digitalmars-d-learn
On Friday, 22 December 2023 at 17:45:27 UTC, Renato wrote: I'm afraid I've lost interest to make it work at this point :( Did you add "-L-ld_classic"?

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Johan via Digitalmars-d-learn
Some general advice: 1 - use `dub` from LDC's package (this may solve some arm64 vs x86 issues when on Apple Silicon CPU) 2 - when you use a new or different compiler, you have to rebuild _all_ packages. So clear your dub cache. I think point 2 is causing your issues. -Johan

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
aNbNiNfMxAyaMKxmMxiZAya in pledged-test-unittest.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/cc failed with status: 1 Error /Users/renato/dlang/ldc2-1.35.0-osx-universal/bin/ldc2 faile

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Renato via Digitalmars-d-learn
On Friday, 22 December 2023 at 12:49:35 UTC, Guillaume Piolat wrote: On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote: ld: symbol(s) not found for architecture x86_64 Make sure you're using the "osx-universal" package in order to have both arch.

Re: macOS Sonoma Linker Issue

2023-12-22 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 21 December 2023 at 23:25:55 UTC, Renato wrote: ld: symbol(s) not found for architecture x86_64 Make sure you're using the "osx-universal" package in order to have both arch. https://github.com/ldc-developers/ldc/releases/tag/v1.35.0 That said, for consumer software it may be a

Re: macOS Sonoma Linker Issue

2023-12-21 Thread Renato via Digitalmars-d-learn
On Thursday, 21 December 2023 at 19:29:31 UTC, Guillaume Piolat wrote: On Thursday, 21 December 2023 at 18:06:51 UTC, Renato wrote: Unless silly is completely broken, it seems like this is a linker issue again. Hello, why not use ldc instead of dmd for macOS? sudo ln -f -s /path/to/ldc

Re: macOS Sonoma Linker Issue

2023-12-21 Thread Julian Fondren via Digitalmars-d-learn
On Thursday, 21 December 2023 at 22:19:07 UTC, Renato wrote: LDC is slow and makes huge multi-MB binaries (is that normal?). DMD seemed much better to me. But at least LDC works :) so will use that for now. On my setup ldc generates small binaries and dmd generates huge ones. The difference

Re: macOS Sonoma Linker Issue

2023-12-21 Thread Renato via Digitalmars-d-learn
On Thursday, 21 December 2023 at 19:29:31 UTC, Guillaume Piolat wrote: On Thursday, 21 December 2023 at 18:06:51 UTC, Renato wrote: Unless silly is completely broken, it seems like this is a linker issue again. Hello, why not use ldc instead of dmd for macOS? sudo ln -f -s /path/to/ldc

Re: macOS Sonoma Linker Issue

2023-12-21 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 21 December 2023 at 18:06:51 UTC, Renato wrote: Unless silly is completely broken, it seems like this is a linker issue again. Hello, why not use ldc instead of dmd for macOS? sudo ln -f -s /path/to/ldc/compiler/bin/ldc2 /usr/local/bin/ldc2 sudo ln -f -s /path/to/ldc/compiler

Re: macOS Sonoma Linker Issue

2023-12-21 Thread Renato via Digitalmars-d-learn
differ in '/Users/confuzzled/add.o' in '/Users/confuzzled/add.o'; address=0x0 points to section(2) with no content in '/Users/confuzzled/dlang/dmd-2.105.2/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker

Re: macOS Sonoma Linker Issue

2023-12-17 Thread Johan via Digitalmars-d-learn
'; address=0x0 points to section(2) with no content in '/Users/confuzzled/dlang/dmd-2.105.2/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 Try passing `-ld_classic` to the linker

Re: macOS Sonoma Linker Issue

2023-12-17 Thread Joel via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 11:01:08 UTC, Johan wrote: On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: [...] Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) https://github.com/ldc-developers/ldc/issues/4501#issuecomment-1738295459 -Johan I've been holding

Re: macOS Sonoma Linker Issue

2023-12-13 Thread Renato via Digitalmars-d-learn
in '/Users/confuzzled/dlang/dmd-2.105.2/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) https://github.com/ldc-developers/ldc

Re: macOS Sonoma Linker Issue

2023-10-18 Thread Gary Chike via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 11:01:08 UTC, Johan wrote: Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) This works for me as well, thank you! I'm running macOS Sonoma and XCode 15.0 (15A240d). It appears XCode 15's linker errors are wreaking havoc with quite a few other

Re: macOS Sonoma Linker Issue

2023-10-04 Thread confuzzled via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 11:01:08 UTC, Johan wrote: Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) https://github.com/ldc-developers/ldc/issues/4501#issuecomment-1738295459 -Johan Thanks. This did the trick.

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Tuna Celik via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 07:47:05 UTC, Paolo Invernizzi wrote: On Wednesday, 4 October 2023 at 07:43:29 UTC, Tuna Celik wrote: On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: [...] I'm also suffering from the same problem. It seems to be an Xcode 15 issues, everything

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Johan via Digitalmars-d-learn
](config_a68_4c3.o)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 Try passing `-ld_classic` to the linker. (`dmd -L-ld_classic`) https://github.com/ldc-developers/ldc/issues/4501#issuecomment-1738295459 -Johan

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Paolo Invernizzi via Digitalmars-d-learn
On Wednesday, 4 October 2023 at 07:43:29 UTC, Tuna Celik wrote: On Tuesday, 3 October 2023 at 23:55:05 UTC, confuzzled wrote: [...] I'm also suffering from the same problem. It seems to be an Xcode 15 issues, everything works fine with 14

Re: macOS Sonoma Linker Issue

2023-10-04 Thread Tuna Celik via Digitalmars-d-learn
](config_a68_4c3.o)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 I'm also suffering from the same problem.

macOS Sonoma Linker Issue

2023-10-03 Thread confuzzled via Digitalmars-d-learn
count from symbol table and dynamic symbol table differ in '/Users/confuzzled/add.o' in '/Users/confuzzled/add.o'; address=0x0 points to section(2) with no content in '/Users/confuzzled/dlang/dmd-2.105.2/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' clang: error: linker command failed with exit

Re: Linker error, doing something wrong?

2023-07-09 Thread Steven Schveighoffer via Digitalmars-d-learn
v", referenced from:   __Dmain in curl_download.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/cc failed with status: 1 Am I missing something? You need to link the library that contains photon. -Steve

Linker error, doing something wrong?

2023-07-09 Thread Dmitry Olshansky via Digitalmars-d-learn
curl_download.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/cc failed with status: 1 Am I missing something? -- Dmitry Olshansky https://olshansky.me

Re: How can I use Linker flags using DMD?

2023-05-29 Thread Ali Çehreli via Digitalmars-d-learn
On 5/29/23 17:39, Marcone wrote: > Can you help me static link dll msvcr120.dll in my x64 dlang program? Sorry, I haven't been programming on Windows for a very long time now. :/ But there are others who program on Windows here. Ali

Re: How can I use Linker flags using DMD?

2023-05-29 Thread Marcone via Digitalmars-d-learn
On Monday, 29 May 2023 at 22:48:29 UTC, Ali Çehreli wrote: On 5/29/23 07:29, Marcone wrote: I want send flags to linker when using dmd.exe compiler. -L does it. Yes, -L-L can happen. :) https://dlang.org/dmd-linux.html Ali Can you help me static link dll msvcr120.dll in my x64 dlang

Re: How can I use Linker flags using DMD?

2023-05-29 Thread Ali Çehreli via Digitalmars-d-learn
On 5/29/23 07:29, Marcone wrote: I want send flags to linker when using dmd.exe compiler. -L does it. Yes, -L-L can happen. :) https://dlang.org/dmd-linux.html Ali

Linker problem

2023-02-23 Thread Willy via Digitalmars-d-learn
Hello everyone I have a problem. The DMD installer for windows does not modify the sc.ini file. The sc.ini file does not include the Visual Studio 2012 Express linker directories (folders). What happens is that when compiling a file like this: dmd app.d an error occurs: lld-link: error: could

Re: Hipreme's #3 Tip of the day - Changing DMD linker on Windows

2022-11-03 Thread Imperatorn via Digitalmars-d-learn
On Tuesday, 1 November 2022 at 16:17:08 UTC, Hipreme wrote: The linker used on Windows when installing DMD is pretty much decided on how your PC was setup. [...] Do you have a blog?

Hipreme's #3 Tip of the day - Changing DMD linker on Windows

2022-11-01 Thread Hipreme via Digitalmars-d-learn
The linker used on Windows when installing DMD is pretty much decided on how your PC was setup. - If you had Visual Studio installed on your windows for "Desktop Development with C++" before downloading DMD (from the site and setup), you will pretty have MSVC Linker as a default

Re: Linker Error with Template Function

2022-10-15 Thread Kyle Ingraham via Digitalmars-d-learn
On Saturday, 1 October 2022 at 21:18:05 UTC, Ali Çehreli wrote: On 10/1/22 11:15, Kyle Ingraham wrote: > storing structs as > `void*` in a wrapper struct with information about their module and > identifier saved elsewhere. Perhaps unrelated but that part reminded me of the following

Re: Linker Error with Template Function

2022-10-01 Thread Ali Çehreli via Digitalmars-d-learn
On 10/1/22 11:15, Kyle Ingraham wrote: > storing structs as > `void*` in a wrapper struct with information about their module and > identifier saved elsewhere. Perhaps unrelated but that part reminded me of the following discussion:

Re: Linker Error with Template Function

2022-10-01 Thread Kyle Ingraham via Digitalmars-d-learn
On Tuesday, 13 September 2022 at 08:43:45 UTC, Nick Treleaven wrote: On Tuesday, 13 September 2022 at 03:00:17 UTC, Kyle Ingraham wrote: Any suggestions for being able to call one function for any instance given but maintain flexible return types? Not sure if it helps, but you can define

Re: Linker Error with Template Function

2022-09-13 Thread Nick Treleaven via Digitalmars-d-learn
On Tuesday, 13 September 2022 at 03:00:17 UTC, Kyle Ingraham wrote: Any suggestions for being able to call one function for any instance given but maintain flexible return types? Not sure if it helps, but you can define final methods in an interface, which can call virtual interface methods:

Re: Linker Error with Template Function

2022-09-12 Thread Kyle Ingraham via Digitalmars-d-learn
#limitations Templates cannot be used to add non-static fields or virtual functions to classes or interfaces. You *should* get an error from the compiler for trying to do this, instead of just a linker error somewhere else down the line, but either way it's not going to work. You'll have to find

Re: Linker Error with Template Function

2022-09-12 Thread Paul Backus via Digitalmars-d-learn
functions to classes or interfaces. You *should* get an error from the compiler for trying to do this, instead of just a linker error somewhere else down the line, but either way it's not going to work. You'll have to find another solution.

Linker Error with Template Function

2022-09-12 Thread Kyle Ingraham via Digitalmars-d-learn
_D3app14TypedURLRouter__T10setHandlerTPFNfC4vibe4http6server17HTTPServerRequestCQBlQBjQBh18HTTPServerResponseAyaZvZQDmMFEQDaQCy6common10HTTPMethodQBlQEhZ__T9__lambda4TQEvTQDoTASQGt16PathCaptureGroupZQBrMFNfQGiQFaQBlZv fatal error LNK1120: 1 unresolved externals Error: linker exited with status 1120 ``` The call is within a delegate to a function that returns

Re: freebsd dub linker error

2022-09-01 Thread Alain De Vos via Digitalmars-d-learn
On Wednesday, 1 June 2022 at 15:23:14 UTC, Kagamin wrote: Try to run clang with -v option and compare with gcc. I've tracked down the problem to the solution where i specify as linker to use gcc12 instead of a clang/llvm. The following works. ``` export CC=clang14 ldc2 --link-defaultlib

Re: Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

2022-08-03 Thread anonymouse via Digitalmars-d-learn
On Wednesday, 3 August 2022 at 09:39:36 UTC, ryuukk_ wrote: Does adding ```-m64``` work I'm using macOS so I don't think that applies. But no, it doesn't do anything for me. Thanks, --anonymouse

Re: Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

2022-08-03 Thread ryuukk_ via Digitalmars-d-learn
Does adding ```-m64``` work

Re: Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

2022-08-03 Thread anonymouse via Digitalmars-d-learn
: "__D3std8internal6memory12__ModuleInfoZ", referenced from: __D3loxQe12__ModuleInfoZ in dlux.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` I'm not explicitly calling anything in std.internal.memory so not sure how to resol

Re: Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

2022-08-02 Thread H. S. Teoh via Digitalmars-d-learn
oZ", referenced from: > __D3loxQe12__ModuleInfoZ in dlux.o > ld: symbol(s) not found for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > ``` > > I'm not explicitly calling anything in std.internal.memory so not sure > how to resolv

Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

2022-08-02 Thread anonymouse via Digitalmars-d-learn
How do I go about tracking down what's causing the following error: ``` Undefined symbols for architecture x86_64: "__D3std8internal6memory12__ModuleInfoZ", referenced from: __D3loxQe12__ModuleInfoZ in dlux.o ld: symbol(s) not found for architecture x86_64 clang: error: link

Re: BetterC Name Mangling Linker Errors

2022-07-27 Thread MyNameHere via Digitalmars-d-learn
Thank you, that seems to have been the source of the error.

Re: BetterC Name Mangling Linker Errors

2022-07-27 Thread Dennis via Digitalmars-d-learn
ime isn't linked when using BetterC, the linker fails to find the init symbol. I think removing the default initialization will fix it: ```D WNDCLASSEXA WindowClass = void; ```

BetterC Name Mangling Linker Errors

2022-07-27 Thread MyNameHere via Digitalmars-d-learn
I have included the source to a simple 64-bit Windows program. It compiles and runs fine with ```dmd -m64 -L="/Subsystem:Windows" -L="/Entry:Main" Main.d```. But compiling with ```-betterC``` using the following throws up a linker error, ```dmd -m64 -betterC -L=&qu

Re: freebsd dub linker error

2022-06-01 Thread Kagamin via Digitalmars-d-learn
Try to run clang with -v option and compare with gcc.

Re: freebsd dub linker error

2022-06-01 Thread Alain De Vos via Digitalmars-d-learn
The detailed error is : ``` /usr/bin/clang test.o -o test -L/usr/local/lib -lphobos2-ldc -ldruntime-ldc -Wl,--gc-sections -lexecinfo -lpthread -lm -m64 ld: error: undefined hidden symbol: __start___minfo referenced by test.d test.o:(ldc.register_dso) ```

Re: freebsd dub linker error

2022-06-01 Thread Alain De Vos via Digitalmars-d-learn
:(ldc.register_dso) ld: error: undefined hidden symbol: __stop___minfo referenced by test.d test.o:(ldc.register_dso) clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/clang failed with status: 1 ``` So I have a workaround by fixing it to gcc

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
Bugs in the clang/llvm toolchain but not in the gcc toolchain ?

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
The following worked , and i don't know what is going on: ``` ldc2 --gcc=gcc11 ```

Re: freebsd dub linker error

2022-05-16 Thread Alain De Vos via Digitalmars-d-learn
:(ldc.register_dso) cc: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/cc failed with status: 1 The only thing i did was disabling 32-bit code in kernel and userland.

Re: freebsd dub linker error

2022-03-17 Thread rikki cattermole via Digitalmars-d-learn
On 18/03/2022 5:56 PM, rikki cattermole wrote: Are you trying to build dub on Android? Android support for ldc is currently broken to due to removal of a linker that is currently required for TLS support. https://github.com/ldc-developers/ldc/issues/3918 My bad I didn't see FreeBSD

Re: freebsd dub linker error

2022-03-17 Thread rikki cattermole via Digitalmars-d-learn
Are you trying to build dub on Android? Android support for ldc is currently broken to due to removal of a linker that is currently required for TLS support. https://github.com/ldc-developers/ldc/issues/3918

freebsd dub linker error

2022-03-17 Thread Alain De Vos via Digitalmars-d-learn
9] ld: error: undefined hidden symbol: __stop___minfo [00:04:19] >>> referenced by sdl.d [00:04:19] >>> bin/dub.o:(ldc.register_dso) [00:04:19] cc: error: linker command failed with exit code 1 (use -v to see invocation) [00:04:19] Error: /usr/bin/cc failed with status:

Re: Linker error under Ubuntu

2022-01-17 Thread murphybeck via Digitalmars-d-learn
Most of the time these are dependency-issues. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications. When encountering this

Re: Is it possible to exchange the linker with a dub project to use mold

2021-12-22 Thread Christian Köstlin via Digitalmars-d-learn
On 2021-12-22 16:28, Paul Backus wrote: On Wednesday, 22 December 2021 at 15:20:15 UTC, Christian Köstlin wrote: https://github.com/rui314/mold Kind regards, Christian This was recently discussed in the "General" forum: https://forum.dlang.org/thread/fiyfgqykhdmglqypx...@forum.dlang.org

Re: Is it possible to exchange the linker with a dub project to use mold

2021-12-22 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 22 December 2021 at 15:20:15 UTC, Christian Köstlin wrote: https://github.com/rui314/mold Kind regards, Christian This was recently discussed in the "General" forum: https://forum.dlang.org/thread/fiyfgqykhdmglqypx...@forum.dlang.org

Is it possible to exchange the linker with a dub project to use mold

2021-12-22 Thread Christian Köstlin via Digitalmars-d-learn
https://github.com/rui314/mold Kind regards, Christian

Re: Include .def definition file information for the linker into a .d source file

2021-11-25 Thread Imperatorn via Digitalmars-d-learn
er and source file(s). No extra voodoo mumbojumbo. This is why we have all those pragmas and the -i switch. Scalable or not it's a pretty common pattern. The build script is modular. I wouldn't call the linker "mumbojumbo". Voodo maybe, yes.

Re: Include .def definition file information for the linker into a .d source file

2021-11-25 Thread Stanislav Blinov via Digitalmars-d-learn
On Thursday, 25 November 2021 at 09:00:52 UTC, Imperatorn wrote: What most ppl do in that case is to just provide a script, for example build.cmd that just does what it needs. The user just clicks the script and it does everything for them. "How can I make it so that I don't need an extra

Re: Include .def definition file information for the linker into a .d source file

2021-11-25 Thread zjh via Digitalmars-d-learn
On Thursday, 25 November 2021 at 06:56:38 UTC, BoQsc wrote: In other words: as simple as possible to use. `dmd -i`,no need `one big file`.

Re: Include .def definition file information for the linker into a .d source file

2021-11-25 Thread Imperatorn via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote: I'm not sure if I have sucessfully achieved something like this before or is it even possible right now, but there is a sample file that comes with DMD compiler: `D\dmd2\samples\d\winsamp.d` **The problem:** `winsamp.d` have to be

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 20:29:36 UTC, Imperatorn wrote: On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote: On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe wrote: On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote: The many times I tried this pragma, it

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread Imperatorn via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote: On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe wrote: On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote: The many times I tried this pragma, it did not even get recognised as pragma at all. You need to use

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
Since the **linkerDirective pragma** is not supported for OMF object file. Linker directives are only supported for MS-COFF output. https://dlang.org/spec/pragma.html#linkerDirective I doubt that this thread is completely resolved.

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:38:42 UTC, BoQsc wrote: [...] **The obvious problem now is:** How can you compile without specifying the flags. With plain dmd. It probably has to do something with the default target of dmd (`-m32`) generating **OMF object file**.

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:29:09 UTC, Adam D Ruppe wrote: On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote: The many times I tried this pragma, it did not even get recognised as pragma at all. You need to use `dmd -m32mscoff` or `dmd -m64`. Plain `dmd` won't work. If

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:23:07 UTC, BoQsc wrote: The many times I tried this pragma, it did not even get recognised as pragma at all. You need to use `dmd -m32mscoff` or `dmd -m64`. Plain `dmd` won't work. If -m32mscoff and -m64 still don't work, what's your dmd version? It was

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:14:42 UTC, Adam D Ruppe wrote: On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote: **The question:** Is there a way to include the `.def` file instructions inside `.d` file, so that there won't be a need for additional `.def` file when compiling.

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:14:42 UTC, Adam D Ruppe wrote: https://dlang.org/spec/pragma.html#linkerDirective example from my stuff: import arsd.minigui; pragma(linkerDirective, "/subsystem:windows"); pragma(linkerDirective, "/entry:mainCRTStartup"); that works with dmd

Re: Include .def definition file information for the linker into a .d source file

2021-11-24 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote: **The question:** Is there a way to include the `.def` file instructions inside `.d` file, so that there won't be a need for additional `.def` file when compiling. (`dmd winsamp`) https://dlang.org/spec/pragma.html#linkerDirective

Include .def definition file information for the linker into a .d source file

2021-11-24 Thread BoQsc via Digitalmars-d-learn
I'm not sure if I have sucessfully achieved something like this before or is it even possible right now, but there is a sample file that comes with DMD compiler: `D\dmd2\samples\d\winsamp.d` **The problem:** `winsamp.d` have to be compiled with `.def` file. ``` /+ Compile with: + dmd winsamp

Linker issues with DMD and LDC

2021-11-12 Thread Thomas Gregory via Digitalmars-d-learn
I get this error when trying to compile a program using [dhtslib](https://github.com/blachlylab/dhtslib) with DMD or any LDC version < 1.25.0. ``` _D39TypeInfo_S7dhtslib3sam6record9SAMRecord6__initZ: error: undefined reference to `_D7dhtslib3sam6record9SAMRecord15__fieldPostblitMFNbNiNlNeZv'

Re: Linker issues with struct postblit

2021-11-01 Thread Thomas Gregory via Digitalmars-d-learn
to use postblit constructor, which is deprecated, in a "new implementation". The original post was long and really buried the lede, but OP was pointing out what looks like a compiler bug: a linker error referencing a postblit symbol only shows up when compiling with DMD or with LDC ea

Re: Linker issues with struct postblit

2021-10-30 Thread James Blachly via Digitalmars-d-learn
t;new implementation". The original post was long and really buried the lede, but OP was pointing out what looks like a compiler bug: a linker error referencing a postblit symbol only shows up when compiling with DMD or with LDC earlier than 1.25. Can someone give some insight?

Re: Linker issues with struct postblit

2021-10-29 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 29 October 2021 at 11:05:14 UTC, Imperatorn wrote: On Thursday, 28 October 2021 at 01:39:10 UTC, Thomas Gregory wrote: I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference

Re: Linker issues with struct postblit

2021-10-29 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 28 October 2021 at 01:39:10 UTC, Thomas Gregory wrote: I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. [...] Postblit?

Linker issues with struct postblit

2021-10-27 Thread Thomas Gregory via Digitalmars-d-learn
I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. Below is the implementation (which is basically our replacement for `RefCounted`). ```d /// Template struct

Re: Dub failing to use the linker correctly.

2021-10-24 Thread greenbyte via Digitalmars-d-learn
: building configuration "vibe-core"... web ~master: building configuration "application"... Compiling Diet HTML template caccount.dt... Linking... lld-link: error: subsystem must be defined Error: linker exited with status 1 Does anybody know why this happens? I am on the latest version of the dmd compiler(2.098.0.) Thanks in advance. Try to install another linker. https://code.dawg.eu/reducing-vibed-turnaround-time-part-1-faster-linking.html

Re: Dub failing to use the linker correctly.

2021-10-23 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 23 October 2021 at 00:54:17 UTC, Ruby The Roobster wrote: On Friday, 22 October 2021 at 21:57:02 UTC, Ruby The Roobster wrote: On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote: On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote: I have a simple vibe-d

Re: Dub failing to use the linker correctly.

2021-10-22 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 22 October 2021 at 21:57:02 UTC, Ruby The Roobster wrote: On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote: On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote: I have a simple vibe-d project built with dub. Running the command, dub build --force returns

Re: Dub failing to use the linker correctly.

2021-10-22 Thread Steven Schveighoffer via Digitalmars-d-learn
commands that dub is running. Note that dub -v does not tell you what DMD passes to the linker. I've complained about this before, but I think on discord/slack. The way you have to see the linker commands is use dub -v to get the link command (which calls dmd), and then copy/paste

Re: Dub failing to use the linker correctly.

2021-10-22 Thread Ruby The Roobster via Digitalmars-d-learn
On Friday, 22 October 2021 at 21:21:41 UTC, jfondren wrote: On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote: I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output: I'd start by running `dub -v build --force`

Re: Dub failing to use the linker correctly.

2021-10-22 Thread jfondren via Digitalmars-d-learn
On Friday, 22 October 2021 at 19:56:37 UTC, Ruby The Roobster wrote: I have a simple vibe-d project built with dub. Running the command, dub build --force returns the following output: I'd start by running `dub -v build --force` instead, to see the exact commands that dub is running.

Dub failing to use the linker correctly.

2021-10-22 Thread Ruby The Roobster via Digitalmars-d-learn
ot;library"... vibe-d:mongodb 0.9.4: building configuration "library"... vibe-d:redis 0.9.4: building configuration "library"... vibe-d:web 0.9.4: building configuration "library"... vibe-d 0.9.4: building configuration "vibe-core"... web ~master: building

Re: Linker error

2021-10-12 Thread bauss via Digitalmars-d-learn
On Tuesday, 12 October 2021 at 00:01:25 UTC, jfondren wrote: On Monday, 11 October 2021 at 23:43:17 UTC, Ruby The Roobster wrote: package mixin template move__() { pragma(inline) package void mv(Point moveby, ref Skeleton tomove) { foreach(i;tomove.faces) {

Re: Linker error

2021-10-11 Thread jfondren via Digitalmars-d-learn
On Monday, 11 October 2021 at 23:43:17 UTC, Ruby The Roobster wrote: package mixin template move__() { pragma(inline) package void mv(Point moveby, ref Skeleton tomove) { foreach(i;tomove.faces) { foreach(k;i.lines) {

Linker error

2021-10-11 Thread Ruby The Roobster via Digitalmars-d-learn
is a test file I am using to test the 'move()' function in physics.d: ```d import dutils.physics; void main() { Skeleton skele = Skeleton([Face([Line(new Point[0],Point(0,0,0),Point(0,0,0))],Point(0,0,0))],Point(0,0,0)); move(Point(1,1,1),10,

Re: Debugging linker errors

2021-08-08 Thread user1234 via Digitalmars-d-learn
On Sunday, 8 August 2021 at 11:58:42 UTC, Bogdan wrote: Hi, I tried to update my server from dmd v2.096.1 to v2.097 and I started getting this linker error: ``` Linking... /usr/bin/ld: .dub/build/executable-ssl11-debug-linux.posix-x86_64-dmd_v2.097.2-beta.1-7651E13F70724FF6B1F8D8B61B1AEABD

Debugging linker errors

2021-08-08 Thread Bogdan via Digitalmars-d-learn
Hi, I tried to update my server from dmd v2.096.1 to v2.097 and I started getting this linker error: ``` Linking... /usr/bin/ld: .dub/build/executable-ssl11-debug-linux.posix-x86_64-dmd_v2.097.2-beta.1-7651E13F70724FF6B1F8D8B61B1AEABD/gis-collective-api.o: in function

Re: alias using Complex!Double in module ... linker error??

2021-08-04 Thread james.p.leblanc via Digitalmars-d-learn
On Wednesday, 4 August 2021 at 01:10:15 UTC, Mike Parker wrote: On Tuesday, 3 August 2021 at 21:40:09 UTC, james.p.leblanc wrote: [...] The alias to Complex!double is a template instantiation. A template instantiation creates a symbol that needs to be linked. So you need to compile

Re: alias using Complex!Double in module ... linker error??

2021-08-03 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 3 August 2021 at 21:40:09 UTC, james.p.leblanc wrote: I am getting linker errors with this stripped-down example: --- **my_main.d:** import std.stdio; import std.complex; import my_module; void main(){ my_TYPE xxx

alias using Complex!Double in module ... linker error??

2021-08-03 Thread james.p.leblanc via Digitalmars-d-learn
I am getting linker errors with this stripped-down example: --- **my_main.d:** import std.stdio; import std.complex; import my_module; void main(){ my_TYPE xxx; writeln(xxx

Re: Can rdmd (under Windows 10) use linker other than Optlink?

2021-05-14 Thread rikki cattermole via Digitalmars-d-learn
On 15/05/2021 9:42 AM, DLearner wrote: I am getting 'Error 42: Symbol Undefined' while testing some (fairly) complex imports. There was a reference in January to an Optlink bug that seemed like it could be responsible. If rdmd can use another linker (and one was recommended), I might

Can rdmd (under Windows 10) use linker other than Optlink?

2021-05-14 Thread DLearner via Digitalmars-d-learn
I am getting 'Error 42: Symbol Undefined' while testing some (fairly) complex imports. There was a reference in January to an Optlink bug that seemed like it could be responsible. If rdmd can use another linker (and one was recommended), I might be able to test things further. Best

  1   2   3   4   5   6   >