Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Sunday, 20 August 2023 at 01:32:08 UTC, Alexander wrote: On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: [...] Thanks for the advice: I have installed dmd, dub, and now ldc with brew. Versions below: [...] Just to add my MacOS version: % sw_vers ``` ProductName:

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Sunday, 20 August 2023 at 01:12:56 UTC, Kyle Ingraham wrote: On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS and DMD? Probably DMD is broken for macOS - could you try to use

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Kyle Ingraham via Digitalmars-d-learn
On Saturday, 19 August 2023 at 22:53:53 UTC, Sergey wrote: On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS and DMD? Probably DMD is broken for macOS - could you try to use

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Kyle Ingraham via Digitalmars-d-learn
On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, DMD seems to work fine, but dub is running into linker issues. On my Intel iMac I have to set `MACOSX_DEPLOYMENT_TARGET`: ``` MACOSX_DEPLOYMENT_TARGET=11 dub run ```

Re: dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Sergey via Digitalmars-d-learn
On Saturday, 19 August 2023 at 21:35:25 UTC, Alexander wrote: Completely new to D, and when trying to setup the toolchain, Could you please specify the versions of macOS and DMD? Probably DMD is broken for macOS - could you try to use LDC? Maybe this thread is relative to the problem:

dub does not correctly link on Macbook Pro 2019 (intel)

2023-08-19 Thread Alexander via Digitalmars-d-learn
Completely new to D, and when trying to setup the toolchain, DMD seems to work fine, but dub is running into linker issues. Below is session showing a simple hello world directory initialized with dub init, and the issues I am encountering. Any help would be greatly appreciated: % tree

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 19 August 2023 at 20:50:23 UTC, thePengüin wrote: On Saturday, 19 August 2023 at 20:16:47 UTC, Ferhat Kurtulmuş wrote: On Saturday, 19 August 2023 at 19:41:47 UTC, thePengüin wrote: On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: [...] estoy usando el de 64 o

Re: Mir-algorithm tutorial?

2023-08-19 Thread Kyle Ingraham via Digitalmars-d-learn
On Saturday, 19 August 2023 at 08:59:40 UTC, Ferhat Kurtulmuş wrote: On Saturday, 19 August 2023 at 01:44:16 UTC, Kyle Ingraham wrote: On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş wrote: I think the main problem is the mir libraries won't get updates since Ilya recently said

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread thePengüin via Digitalmars-d-learn
On Saturday, 19 August 2023 at 20:16:47 UTC, Ferhat Kurtulmuş wrote: On Saturday, 19 August 2023 at 19:41:47 UTC, thePengüin wrote: On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread thePengüin via Digitalmars-d-learn
On Saturday, 19 August 2023 at 20:16:47 UTC, Ferhat Kurtulmuş wrote: On Saturday, 19 August 2023 at 19:41:47 UTC, thePengüin wrote: On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 19 August 2023 at 19:41:47 UTC, thePengüin wrote: On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar este codigo de c++ ` #include \ using namespace std; int main() {

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread thePengüin via Digitalmars-d-learn
On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar este codigo de c++ ` #include \ using namespace std; int main() { return 0; } int foo(int i, int j) { cout

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread thePengüin via Digitalmars-d-learn
On Monday, 14 August 2023 at 07:38:46 UTC, Sergey wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: hola a todos quisiera ejecutar este codigo de c++ Error: linker exited with status 1 Hola. On the page https://dlang.org/spec/cpp_interface.html commands to run also have

Re: How can I execute C++ functions from Dlang?

2023-08-19 Thread thePengüin via Digitalmars-d-learn
On Monday, 14 August 2023 at 07:36:31 UTC, Ferhat Kurtulmuş wrote: On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote: [...] ?Tu usas ambos de 64 bit o 32 bit para compiladores? No puedo reproducir tu codigo. Pero yo puedo ejecutar esto en Windows: cppcode.cpp ```d #include

Spec for the ‘locality’ parameter to the LDC and GDC builtin magic functions for accessing special CPU prefetch instructions

2023-08-19 Thread Cecil Ward via Digitalmars-d-learn
I’m trying to write a cross-platform function that gives access to the CPU’s prefetch instructions such as x86 prefetch0/1/2/prefetchnta and AAarch64 too. I’ve found that the GDC and LDC compilers provide builtin magic functions for this, and are what I need. I am trying to put together a

Windows API: GetUserName: Retrieve the name of the user associated with the current thread.

2023-08-19 Thread BoQsc via Digitalmars-d-learn
I'm sharing some code here. **It's not completely tested and might contain serious mistakes, repetitions, bad style and readabilty. But it seems to work.** Critique, improvements and feedback might help. Demonstration This code retrieves username of the current windows user using

Windows API: lld-link: error: undefined symbol: GetUserNameA

2023-08-19 Thread BoQsc via Digitalmars-d-learn
Today I've tried to use Windows API once again and encountered very time consuming case. It's been a long time since the last time I used Windows API. This time I've had an idea that it would be interesting to get thread associated username using Windows API. So after some time while trying

Re: Mir-algorithm tutorial?

2023-08-19 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 19 August 2023 at 01:44:16 UTC, Kyle Ingraham wrote: On Friday, 18 August 2023 at 12:14:45 UTC, Ferhat Kurtulmuş wrote: I think the main problem is the mir libraries won't get updates since Ilya recently said that he was not an open source developer anymore. That’s unfortunate

DMD: Versioning compilation: generate Identifier for each compilation and writeln it.

2023-08-19 Thread BoQsc via Digitalmars-d-learn
I would like to display some identifier that is set after compilation and remains unchanged. This is to recognise and check if two binaries belong to the same compilation or it is a different compilation. I would place it into **version** command of my program. This is what I have now.