Re: How send parameters to DMD when using DUB

2021-04-19 Thread Marcone via Digitalmars-d-learn
/+ dub.sdl: dependency "telega" version="~>0.2.0" lflags "C:\\Users\\Usuario\\Arquivos\\Sublime Text Build 3211\\Data\\Packages\\resources.res" platform="dmd" +/ Solved replaceing dflags to lflags

How send parameters to DMD when using DUB

2021-04-19 Thread Marcone via Digitalmars-d-learn
I need add resources. But how can I make it using DUB?

Re: How send parameters to DMD when using DUB

2021-04-19 Thread Marcone via Digitalmars-d-learn
I'm trying this code but do not work. /+ dub.sdl: dependency "telega" version="~>0.2.0" dflags "C:\\Users\\Usuario\\Arquivos\\Sublime Text Build 3211\\Data\\Packages\\resources.res" platform="dmd" +/

Re: DUB Error with packcage dformlib

2021-04-18 Thread Marcone via Digitalmars-d-learn
On Sunday, 18 April 2021 at 07:31:12 UTC, Imperatorn wrote: On Sunday, 18 April 2021 at 01:37:14 UTC, Marcone wrote: I have this message when try build dub. How solve it? Unresolvable dependencies to package dformlib app ~master depends on dformlib ~0.2.2> Just a comment, dforms is millions

Re: win64 DLL stdout printing after main process completes

2021-04-20 Thread Marcone via Digitalmars-d-learn
On Monday, 19 April 2021 at 14:55:03 UTC, cc wrote: I'm not sure if this is something unique to D or not, but I've having a minor issue where stdout output from a DLL (either via printf or phobos std.stdio write) is not displayed until after the main process has completed. I'm making a

DUB Error with packcage dformlib

2021-04-17 Thread Marcone via Digitalmars-d-learn
I have this message when try build dub. How solve it? Unresolvable dependencies to package dformlib app ~master depends on dformlib ~0.2.2>

How can I check if template variable parameter is iterable before handle it?

2021-02-21 Thread Marcone via Digitalmars-d-learn
import std; void foo(T)(T bar){ static if (bar.isiterable()) // Need Somethin to check if bar is iterable. { // Execute it if bar is iterable. foreach (i; bar) { } } else { // Execute it

Re: How can I check if template variable parameter is iterable before handle it?

2021-02-21 Thread Marcone via Digitalmars-d-learn
On Sunday, 21 February 2021 at 12:47:46 UTC, Boris Carvajal wrote: On Sunday, 21 February 2021 at 11:58:11 UTC, Marcone wrote: import std; void foo(T)(T bar){ static if (bar.isiterable()) // Need Somethin to check if bar is iterable. { // Execute it if bar is

How add png image to zip file using std.zip?

2021-02-21 Thread Marcone via Digitalmars-d-learn
ZipArchive zip = new ZipArchive(); std.file.write("foo.zip", zip.build()); ArchiveMember f = new ArchiveMember(); f.name = "Wallpaper_001.png"; zip.addMember(f); std.file.write("foo.zip", zip.build()); File is added with file size 0. How

Re: How add png image to zip file using std.zip?

2021-02-22 Thread Marcone via Digitalmars-d-learn
On Sunday, 21 February 2021 at 18:10:43 UTC, JN wrote: On Sunday, 21 February 2021 at 17:17:56 UTC, Marcone wrote: ZipArchive zip = new ZipArchive(); std.file.write("foo.zip", zip.build()); ArchiveMember f = new ArchiveMember(); f.name = "Wallpaper_001.png";

How to extend the string class to return this inside the square bracket?

2021-08-13 Thread Marcone via Digitalmars-d-learn
How to extend the string class to return this inside the square bracket the same way opDollar $ returns the length of the string? Thank you. import std; void main(){ writeln("Hello World!"[0..this.indexOf("o")]); }

Re: How to extend the string class to return this inside the square bracket?

2021-08-13 Thread Marcone via Digitalmars-d-learn
On Friday, 13 August 2021 at 21:47:22 UTC, Steven Schveighoffer wrote: On 8/13/21 5:05 PM, Marcone wrote: How to extend the string class to return this inside the square bracket the same way opDollar $ returns the length of the string? Thank you.     import std;     void main(){    

Re: How to extend the string class to return this inside the square bracket?

2021-08-13 Thread Marcone via Digitalmars-d-learn
On Friday, 13 August 2021 at 23:08:07 UTC, jfondren wrote: On Friday, 13 August 2021 at 22:09:59 UTC, Marcone wrote: Isn't there some unario operator template that I can use with lambda to handle a string literal? So, something other than an exact "lit"[0..this.xx(..)] syntax is fine?

Re: How to extend the string class to return this inside the square bracket?

2021-08-13 Thread Marcone via Digitalmars-d-learn
On Friday, 13 August 2021 at 21:14:29 UTC, user1234 wrote: On Friday, 13 August 2021 at 21:05:22 UTC, Marcone wrote: How to extend the string class to return this inside the square bracket the same way opDollar $ returns the length of the string? Thank you. import std; void main(){

Re: How to extend the string class to return this inside the square bracket?

2021-08-14 Thread Marcone via Digitalmars-d-learn
On Saturday, 14 August 2021 at 08:24:41 UTC, user1234 wrote: On Friday, 13 August 2021 at 23:33:05 UTC, Paul Backus wrote: On Friday, 13 August 2021 at 23:23:55 UTC, Marcone wrote: writeln("Hello World!"[x.indexOf("e")..x.indexOf("r")]); indexOf()is just a simple example, not the goal. I

Re: How to extend the string class to return this inside the square bracket?

2021-08-13 Thread Marcone via Digitalmars-d-learn
On Friday, 13 August 2021 at 23:21:42 UTC, Ali Çehreli wrote: On 8/13/21 4:08 PM, jfondren wrote: On Friday, 13 August 2021 at 22:09:59 UTC, Marcone wrote: Isn't there some unario operator template that I can use with lambda to handle a string literal? So, something other than an exact

Re: how to import .lib library

2021-08-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 August 2021 at 09:49:39 UTC, Timofeyka wrote: Hello! I may have a very stupid question, but still. How do I include a .lib library? How to use it in your code? Inside the source code you can use pragma. Example: pragma(lib, "gdi32.lib"); In DMD command line you can use -L flag

Re: how to import .lib library

2021-08-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:12:17 UTC, Timofeyka wrote: Thank you for your reply! I wanted to link to my project another project without source code. This tutorial can help you create yours libs: https://wiki.dlang.org/Win32_DLLs_in_D

Why can't the DMD compiler accept files or directories with white spaces even delimited by quotes?

2021-09-04 Thread Marcone via Digitalmars-d-learn
Example: dmd "hello world.d"

Re: Why can't the DMD compiler accept files or directories with white spaces even delimited by quotes?

2021-09-04 Thread Marcone via Digitalmars-d-learn
On Sunday, 5 September 2021 at 00:00:33 UTC, jfondren wrote: On Saturday, 4 September 2021 at 23:50:33 UTC, Marcone wrote: Example: dmd "hello world.d" ``` $ cat hello\ world.d module helloworld; void main() { import std.stdio : writeln; writeln("without the explicit 'module', this

How to divide by space keeping words with spaces inside quotes?

2021-08-08 Thread Marcone via Digitalmars-d-learn
How to divide by space keeping words with spaces inside quotes? Exanple: string text = "Duck Cat \"Carl Rivers\" Dog"; I want split to: ["Duck", "Cat", "Carl Rivers", "Dog"] ATENTION: I DON'T WANT: ["Duck", "Cat", "Carl", "Rivers", "Dog"] How can I get it in Dlang?

Re: How to divide by space keeping words with spaces inside quotes?

2021-08-09 Thread Marcone via Digitalmars-d-learn
Thank you very much! With your helps I created this function that works fine: // Function splitcommas() string[] splitcommas(string text) nothrow { try { return text.splitter!(Yes.keepSeparators)(regex("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'")).array.map!(x => x.replace("\"",

How Add Local modules mymodule.d using DUB?

2021-08-09 Thread Marcone via Digitalmars-d-learn
My main program need import a local module called mymodule.d. How can I add this module using DUB? Thank you.

Re: How Add Local modules mymodule.d using DUB?

2021-08-09 Thread Marcone via Digitalmars-d-learn
On Monday, 9 August 2021 at 16:37:10 UTC, Steven Schveighoffer wrote: On 8/9/21 12:32 PM, Marcone wrote: My main program need import a local module called mymodule.d. How can I add this module using DUB? Thank you. You mean how to add a local project (that isn't on code.dlang.org)? `dub

Re: How Add Local modules mymodule.d using DUB?

2021-08-09 Thread Marcone via Digitalmars-d-learn
On Monday, 9 August 2021 at 16:37:10 UTC, Steven Schveighoffer wrote: On 8/9/21 12:32 PM, Marcone wrote: My main program need import a local module called mymodule.d. How can I add this module using DUB? Thank you. You mean how to add a local project (that isn't on code.dlang.org)? `dub

Error when compile with DMD using -m64?

2021-08-09 Thread Marcone via Digitalmars-d-learn
When I compile program in Ly Windows x64 using dmd flag -m64 the program not run. How fix it?

Re: Error when compile with DMD using -m64?

2021-08-09 Thread Marcone via Digitalmars-d-learn
On Monday, 9 August 2021 at 19:58:03 UTC, novice2 wrote: On Monday, 9 August 2021 at 19:53:48 UTC, Marcone wrote: program not run. compilation errors? runtime errors? Solved converting long and int.

DMC Error: comctl32.lib Error 43: Not a Valid Library File

2021-08-07 Thread Marcone via Digitalmars-d-learn
Using DMC to compile .cpp using gdi32.lib as dmc compile parameter. I get this error: OPTLINK (R) for Win32 Release 8.00.16 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html comctl32.lib Error 43: Not a Valid Library

Re: DMC Error: comctl32.lib Error 43: Not a Valid Library File

2021-08-07 Thread Marcone via Digitalmars-d-learn
I added gdi32.lib user32.lib kernel32.lib comctl32.lib as dmc parameters. But don't work.

How suppress (Hide) prompt command console in DMC? Like -mwindows in C++?

2021-08-07 Thread Marcone via Digitalmars-d-learn
I create a gui program using DMC. I want to know how suppress (Hide) prompt command console in DMC? Like -mwindows in C++. Thank you.

Re: How suppress (Hide) prompt command console in DMC? Like -mwindows in C++?

2021-08-07 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 August 2021 at 00:23:55 UTC, Adam D Ruppe wrote: On Sunday, 8 August 2021 at 00:02:18 UTC, Marcone wrote: I create a gui program using DMC. I want to know how suppress (Hide) prompt command console in DMC? Like -mwindows in C++. Thank you. use /subsystem:windows a few more

-L/SUBSYSTEM:windows Error when using -m64

2021-08-10 Thread Marcone via Digitalmars-d-learn
How use -L/SUBSYSTEM:windows for hide console in x64 prograns? Becouse if I use -L/SUBSYSTEM:windows and -m64 I get this error: lld-link: error: undefined symbol: WinMain referenced by msvcrt120.lib(msvcrt_stub2.obj):($LN5) Error: linker exited with status 1 If I delete -L/SUBSYSTEM:windows

Re: -L/SUBSYSTEM:windows Error when using -m64

2021-08-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 August 2021 at 18:36:27 UTC, Adam D Ruppe wrote: On Tuesday, 10 August 2021 at 18:34:03 UTC, Marcone wrote: How can I hide console using -m64? http://dpldocs.info/experimental-docs/arsd.simpledisplay.html#installation-instructions Hi, do you have some other solution without

Re: -L/SUBSYSTEM:windows Error when using -m64

2021-08-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 August 2021 at 18:51:28 UTC, Adam D Ruppe wrote: On Tuesday, 10 August 2021 at 18:45:35 UTC, Marcone wrote: Hi, do you have some other solution without arsd.simpledisplay? I want only dmd feature. Did you read the paragraph under the link? That IS a dmd switch. Or a ldc

Re: -L/SUBSYSTEM:windows Error when using -m64

2021-08-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 August 2021 at 19:01:42 UTC, Adam D Ruppe wrote: On Tuesday, 10 August 2021 at 18:59:33 UTC, Marcone wrote: Using -Lgdi32.lib -Luser32.lib? Same error. The part after that: If you want the Windows subsystem too, use -L/subsystem:windows -L/entry:mainCRTStartup. Pass BOTH

Re: Error when compile with DMD using -m64?

2021-08-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 August 2021 at 15:55:42 UTC, Bastiaan Veelo wrote: On Tuesday, 10 August 2021 at 01:29:04 UTC, Marcone wrote: Solved converting long and int. Use `size_t` and `ptrdiff_t` instead to make your program compile in both 32 bit and 64 bit modes.

std.signals: Why emit() not extist?

2021-12-30 Thread Marcone via Digitalmars-d-learn
I get this error: Error: undefined identifier `emit`, did you mean function `exit`?

Re: I like dlang but i don't like dub

2022-03-21 Thread Marcone via Digitalmars-d-learn
The DMD compiler could import the modules directly with the import command just like it does with the modules in the phobos library.

Re: Where I download Digital Mars C Preprocessor sppn.exe?

2022-04-02 Thread Marcone via Digitalmars-d-learn
ImportC is deprecated as everything in D is deprecated and abandoned. No link works, every download link is broken as no one cares. All D code is always full of bugs and needs to be corrected by the user before trying to run it, in order to realize that it wasted time.

Where I download Digital Mars C Preprocessor sppn.exe?

2022-04-02 Thread Marcone via Digitalmars-d-learn
Where I download Digital Mars C Preprocessor sppn.exe? I need it to use ImportC

Re: Example of Windows SSL with Secure Channel?

2022-03-21 Thread Marcone via Digitalmars-d-learn
I hope one day the creators of the D programming language will implement std.socket.ssl ​​in the Phobos library.

Why exe size change if import entire std or just writeln?

2022-03-23 Thread Marcone via Digitalmars-d-learn
import std.stdio : writeln; void main(){ writeln("Bom dia"); } Size exe file: 258 KB -- import std; void main(){ writeln("Bom dia"); } Size exe file: 595 KB If dependencies are resolved at compile time, why does

Re: I like dlang but i don't like dub

2022-03-22 Thread Marcone via Digitalmars-d-learn
Why is dmd unable to import modules installed by dub using the import command like it does with the Phobos library? He can't send these modules to Linker? Needing to be passed to dmd via command line. I think it could be all automatic.

How can I implement SSL protocol in my program?

2022-03-22 Thread Marcone via Digitalmars-d-learn
/* Direct DropBear Dlang Injector. Created by Marcone (thegrapev...@email.com) in 2019. */ import std; import core.thread; import core.stdc.stdlib; // Configuracoes. string LISTEN_PORT = "127.0.0.1:8088"; string PAYLOAD = "GET / HTTP/1.1\r\nhost: www.bing.com\r\n\r\n";

Re: DUB issues

2022-04-18 Thread Marcone via Digitalmars-d-learn
The dub creator shouldn't even remember creating this anymore. It makes me sad when I see that things in D are old, forgotten, outdated, abandoned. D is the best programming language in the world. But nobody appreciates it. It makes me sad when I see the repositories for over 10 years without

QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-26 Thread Marcone via Digitalmars-d-learn
I'm trying to load a .ui GUI designed in Qt Designer. I'm following the examples in the links below, but the following error occurs: Error: undefined identifier `QFormBuilder` QFormBuilder qfb = new QFormBuilder(this); setQtObj((qfb.load(":/fQtE56help.ui")).QtObj); *

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-20 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Did you try 2.099 too? Because the default

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Did you try 2.099 too? Because the default

Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
Using -L/SUBSYSTEM:windows user32.lib Error: lld-link: error: undefined symbol: _WinMain@16 referenced by msvcrt120.lib(msvcrt_stub2.obj):(_WinMainCRTStartup) Error: linker exited with status 1

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 19:35:20 UTC, Adam D Ruppe wrote: On Thursday, 19 May 2022 at 19:29:25 UTC, Marcone wrote: Using -L/SUBSYSTEM:windows user32.lib you using a main() function right? Please note when compiling on Win64, you need to explicitly list -Lgdi32.lib -Luser32.lib on the

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 22:13:06 UTC, Adam Ruppe wrote: On Thursday, 19 May 2022 at 21:41:50 UTC, Marcone wrote: Are you using the `-L/entry:mainCRTStartup` or the `L/entry:wmainCRTStartup` ? -L/entry:mainCRTStartup try the w one too. both doing the same result? Both is doing the same

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 20:33:34 UTC, Adam D Ruppe wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Are you using the

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
Is there any way to do this automatically like Python? https://docs.python.org/3/download.html

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
On Tuesday, 28 June 2022 at 19:06:48 UTC, Steven Schveighoffer wrote: On 6/28/22 2:42 PM, Marcone wrote: [...] We used to have this, it wasn't used, and keeping it building was a drain on resources. What is wrong with the online docs? What dissemination do you think could happen if we had

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
On Tuesday, 28 June 2022 at 20:38:10 UTC, forkit wrote: On Tuesday, 28 June 2022 at 18:42:11 UTC, Marcone wrote: [...] So assuming i understand what you're asking for here, it already exists. When you download D, you get a directory named 'html'. In that directory is a file named

ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
Beloved, I love programming in D. D is my favorite programming language. I'm not a professional programmer, but I love to program. I would like to learn D deeply. Most programming languages have a PDF/CHM/MOBI/ePub version of the standard library. But D still doesn't have such a portable

Re: UI Library

2022-06-10 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote: I need to write a piece of software to track and categorize some purchases. It's the kind of thing I could probably write in a couple of hours in C#/Java + html/css/javascript. However, something keeps drawing me to D and as this is a

Re: UI Library

2022-06-10 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote: I need to write a piece of software to track and categorize some purchases. It's the kind of thing I could probably write in a couple of hours in C#/Java + html/css/javascript. However, something keeps drawing me to D and as this is a

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru I sent you an email. Could you answer me and send me these dlls for

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru Hi, I didn't compile it as Qt is too big for me to download just to

What do you think about using Chat GPT to create functions in D?

2023-04-03 Thread Marcone via Digitalmars-d-learn
What do you think about using Chat GPT to create functions in D? I asked Chat-GPT to create a function in D that was similar to the rsplit() function in Python. It returned this code to me: import std.algorithm; import std.array; import std.string; string[] rsplit(string input, string

Re: How static link dll msvcr120.dll?

2023-05-28 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 12:29:15 UTC, Marcone wrote: How can I static link msvcr120.dll using dmd? Please, could someone tell me if it is possible to link the msvcr120.dll library to the program's executable using the dmd compiler? Because I would like my program to remain portable.

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

How static link dll msvcr120.dll?

2023-05-26 Thread Marcone via Digitalmars-d-learn
How can I static link msvcr120.dll using dmd?

Re: How make a Dlang with Windows GUI x64 without console?

2023-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 19:15:16 UTC, ryuukk_ wrote: On Friday, 26 May 2023 at 18:05:38 UTC, Marcone wrote: How can I hide console of a window GUI on Windows x64? I need run with -m64 Someone asked the exact same thing yesterday, check their post:

Re: How make a Dlang with Windows GUI x64 without console?

2023-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 19:17:28 UTC, John Chapman wrote: On Friday, 26 May 2023 at 18:05:38 UTC, Marcone wrote: How can I hide console of a window GUI on Windows x64? I need run with -m64 -L/SUBSYSTEM:Windows And if you're using 'main' as the entry point rather than 'WinMain':

Re: How static link dll msvcr120.dll?

2023-06-01 Thread Marcone via Digitalmars-d-learn
On Tuesday, 30 May 2023 at 05:18:11 UTC, novice2 wrote: you cannot "static link dll", "d" in "dll" is "dynamic". you can implicity or explicity load dll. https://learn.microsoft.com/en-us/cpp/build/linking-an-executable-to-a-dll?view=msvc-170 may be you mean static link msvcr120.lib? i am not

<    1   2   3