I work with Qt from D and I do not need the DOS window. How to
turn it off.
On Wednesday, 24 July 2013 at 08:08:19 UTC, Rikki Cattermole
wrote:
version(Windows) {
import core.sys.windows.windows : FreeConsole;
FreeConsole();
}
DOS window flashes at the start, and that's bad.
On Wednesday, 24 July 2013 at 08:07:55 UTC, Alex H wrote:
This code:
void test(const int n)
{
auto j = n;
j++;
}
Gives this error:
cannot modify const expression j
Is this considered a feature or a bug? I would assume most
people
wouldn't want new variables inheriting const.
Thank you all. All ok!
I am D since the spring. Without a simple GUI to work hard. I
tried to deal with QtD quick disconnects, but I failed. I had to
develop its small and very simple library to work with Qt. The
working title of QtE. Works in Windows 32 and Linux 32. A very
simple idea. Instances of classes get thro
On Monday, 9 September 2013 at 09:39:51 UTC, Chris wrote:
On Monday, 9 September 2013 at 08:06:17 UTC, MGW wrote:
I am D since the spring. Without a simple GUI to work hard. I
tried to deal with QtD quick disconnects, but I failed. I had
to develop its small and very simple library to work
Maybe this will be useful in the work:
Compile
Windows: dmd st1.d
Linux: dmd st1.d -L-ldl
// ---
// MGW 05.01.14
// Model in D a C++ object QByteArray of Qt.
//
import core.runtime; // Load DLL for
Hi yes I think noticed in another thread that you were wrapping
Qt with dynamic loading of the qt libs, interesting idea - does
your code allow subclassing of the Qt classes and overriding
the virtual methods? I'm taking a much more traditional
approach, but there is method in my madness :-)
On Monday, 20 January 2014 at 08:33:09 UTC, ilya-stromberg wrote:
Do you know any library with string encoding/decoding support?
I need more encodings than provides `std.encoding`.
Library to work with Qt.
https://github.com/MGWL/QtE-Qt_for_Dlang_and_Forth
Working with Qt and its QTextCodec c
On Wednesday, 2 April 2014 at 12:47:06 UTC, Denis Mezhov wrote:
I'm trying out to windows console unicode latin string
writeln("aaabbb");
console out: aaabbb
trying out to console unicode cyrillic string
writeln("бббггг");
console out: ╨│╨│╨│╨▒╨▒╨▒
How to out unicode cyrillic string to console
On Saturday, 19 May 2018 at 23:52:58 UTC, IntegratedDimensions
wrote:
I have a member callback that I want to use as a C callback.
http://www.agner.org/optimize/calling_conventions.pdf
https://www.youtube.com/watch?v=xhDS377mAc4
On Friday, 8 June 2018 at 05:00:57 UTC, TheGag96 wrote:
I'm sorry about bringing this into here instead of DWT's
subforum, but it's somewhat dead and hasn't been getting a lot
of attention. I decided to finally play around with DWT today
and tried to build the example. I got this:
Performing
On Thursday, 5 July 2018 at 08:42:39 UTC, drug wrote:
There were several attempts to make Qt binding for dlang ...
QtE 5 works great on Win32/64, Linux 32/64 and Mac OS x 64. The
main difference is that Qt5 uses a set of pre-defined slots and
signals rather than creating them using a MOC or c
On Saturday, 21 July 2018 at 19:11:08 UTC, Dr.No wrote:
So I went to try out QWebView on Windows from this wrapper:
https://github.com/MGWL/QtE5
all the examples went fine until I tried QWebView:
Prior to version Qt-5.5 WebKit was used, and for later versions
of chromium-based WebEngine. You
I have recently looked through Haiku OS and got surprised to find
there dmd 2.072.
There was only running file but Phobos and DrinTime were missing.
Are there any plans to port dmd to Haiku OS nowadays?
Is there a manual (example) on dmd porting on Haiku OS?
immutable long[string] aa = [
"foo": 5,
"bar": 10,
"baz": 2000
];
... Error: non-constant expression ["foo":5L, "bar":10L,
"baz":2000L]
The citation from https://dlang.org/spec/hash-map.html
Static Initialization of AAs
immutable long[string] aa = [
"foo": 5,
"bar": 10,
"baz": 2000
];
unittest
{
assert(aa["foo"] == 5);
assert(aa["bar"] == 10);
assert(aa["baz"] == 2000);
}
Judging
I want to get address of object Cfoo in constructor. Whether it
is possible?
now:
-
class Cfoo {
void* adrThis;
void saveThis(void* adr) { adrThis = adr; }
}
...
Cfoo foo = new Cfoo(); foo.saveThis(&foo);
shall be
--
class Cfoo {
void* adrThi
On Sunday, 13 March 2016 at 15:49:20 UTC, WebFreak001 wrote:
On Sunday, 13 March 2016 at 15:43:02 UTC, MGW wrote:
I want to get address of object Cfoo in constructor. Whether
it is possible?
class Cfoo {
void* adrThis;
this() {
adrThis = cast(void*) this
On Sunday, 13 March 2016 at 16:02:07 UTC, WebFreak001 wrote:
However note that this is not the same as that function.
cast(void*)this and &this are 2 different things. So if you
want to do the same as saveThis just do void* thisAddr =
cast(void*) &this; instead
void* thisAddr = cast(void*) &t
I for myself write Qt-5 wrapper. I use calls from Qt (C ++) as
extern (C) calls.
Prompt how to write this code well and with use of abilities to
integrate D and C ++
--
// ex4.d - Concepts of QAction.QtE5
// compile -
// dmd ex4 qte5
import core.runtime;
import
On Thursday, 31 March 2016 at 11:47:34 UTC, MGW wrote:
--
Help me to optimize this source code. How to apply here delegates
and generally whether possibly to make it here
Windows 7 32bit
---
import std.stdio;
import std.conv;
class CFormaMain {
~this() {
char[] zz = [ 'A', 'B', 'C' ];
writeln(to!string(zz));
}
}
int main(string[] args) {
CFormaMain formaMain;
formaMain = new CForm
On Sunday, 29 May 2016 at 11:03:36 UTC, Russel Winder wrote:
GKT+ has a reputation for being dreadful on OSX and even worse
on Windows. Qt on the other hand has a reputation for being the
most portable – though clearly wx is (arguable) the most
portable.
QtE5 - is my wrapper for Qt-5
https:/
How can we build QtE5 and/or the examples?
Download qte5.zip from github. Unzip it to qte5-master.
If you have Windows 32 then copy
qte5-master/windows32/QtE5Widgets32.dll to folder qte5-master.
Copy RunTime Qt-5 (all files and folders from
qte5-master/windows32/rt_Qt5_windows32.zip) to qte5-m
Method which I use now:
source D:
-
extern (C) {
int on_metFromD(CEditWin* uk, int aa, int bb) {
return (*uk).metFromD(int aa, int bb);
}
}
class CEditWin {
. . .
// Method for to call
int metFromD(int a, int b) {
return a + b;
}
}
main() {
CE
On Saturday, 27 August 2016 at 07:13:01 UTC, Nicholas Wilson
wrote:
easiest method would be to mark the D class extern(C++) noting
that in C++ a D class reference becomes a pointer to the C++
class.
In "the D class extern(C++)" do't work phobos.
I make a packet for dub in Linux. In a packet there is libQt.so
which is loaded by an example of D. Usually I execute
LD_LIBRARY_PATH='pwd'; export LD_LIBRARY_PATH, but now it is
necessary to make it in dub. How to make it?
My STARTING application shall read the enviroment variable.
For example MY_VARIABLE= "I'm Gena".
The MY_VARIABLE variable needs to be set in dub.json so
what she would be visible in case of start of my application.
Purpose: to set LD_LIBRARY_PATH having specified a certain
directory in dub packet
On Friday, 30 September 2016 at 11:09:37 UTC, rikki cattermole
wrote:
There is no way to do this.
it is necessary to add section to dub:
"enviroment": [
{ "LD_LIBRARY_PATH", "$PACKAGE_DIR" },
{ "MY_VARIABLE", "$PACKAGE_DIR/IMAGES"}
]
On Saturday, 19 November 2016 at 22:18:39 UTC, Sai wrote:
I have seen luad and Walters own JavaScript VM that can be used
in D for embedded scripting purpose in an application.
I was wondering which is more popular among D applications? Any
suggestions?
Thanks, sai
Look at one more option.
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] buf;
for(int j; j != 1; j++) buf ~= 65;
MessageBoxA(null, "--on for--".ptr, "".ptr, 0);
// delete buf; // if ON - then mem
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] buf;
for(int j; j != 1; j++) buf
On Tuesday, 22 November 2016 at 15:53:39 UTC, Steven
Schveighoffer wrote:
On 11/21/16 11:53 AM, ag0aep6g wrote:
Thank you very much for explaining such a difficult and slippery
situation.
On Wednesday, 23 November 2016 at 18:54:35 UTC, Igor Shirkalin
wrote:
Igor, is the good Russian-speaking forum
https://vk.com/vk_dlang.
There are articles on GUI and other aspects of dlang.
Hi!
I write plugin for 1C:Enterprise 8.3 on dmd now.
https://youtu.be/apLppufZulI
I try to repeat structure C++ (interface) on dmd.
But D no inheritance of structures. What it is possible
to replace with the D following code on C ++struct IInterface {};
C++
-
struct IMsgBox : public IInter
On Sunday, 15 January 2017 at 19:00:49 UTC, MGW wrote:
Hi!
struct IInterface {};
struct IMsgBox : public IInterface {
virtual bool Confirm(const wchar* queryText, tVariant* retVal) =
0;
virtual bool Alert(const wchar* text) = 0;
};
On Monday, 16 January 2017 at 00:07:44 UTC, Adam D. Ruppe wrote:
That's just interfaces and classes in D, so change struct to
those words and go fro there.
// --- jd.d: compile: dmd -c jd
import std.stdio;
extern (C++) interface IHome { int sum(int, int); };
extern (C++) void printIHome(vo
On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote:
On Tuesday, 7 February 2017 at 10:46:24 UTC, kinke wrote:
I've only every done trivial C++ integration before. As soon as
I tried something "real" it all broke down incredibly fast.
Probably going to have to file some bugs on name
On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote:
Here still example
https://pp.vk.me/c636630/v636630885/46579/neSdIip1ySI.jpg
On Thursday, 23 March 2017 at 18:10:20 UTC, Dillen Meijboom wrote:
Hi there,
I'm learning D for a while because it's really easy to use
C-code in D.
The problem is that I don't really get how to deal with the
data structures defined in C in D.
Perhaps, it will be interesting to you.
I advise
On Monday, 24 April 2017 at 00:55:45 UTC, Nierjerson wrote:
Still trying to get the com automation code working. This is a
Please, use ZIP for archive.
On Wednesday, 17 May 2017 at 19:48:42 UTC, Igor wrote:
On Wednesday, 17 May 2017 at 18:03:04 UTC, Igor wrote:
What exactly do mean by "binding"?
Also I am wondering if using extern(C) as opposed to extern(D)
only affects name mangling or am I losing some DLang
possibilities since I am only ca
On Friday, 26 May 2017 at 12:49:27 UTC, Oleksii wrote:
Hi,
Call methods and property C++ from D. Interface C++ and D and
their interaction.
https://pp.userapi.com/c636630/v636630885/4657a/07wCn5hbHHo.jpg
https://www.youtube.com/watch?v=HTgJaRRfLPk
There are two arrays of string [] mas1, mas2; Size of each about
5M lines. By the size they different, but lines in both match for
95%. It is necessary to find all lines in an array of mas2 which
differ from mas1. The principal criterion - speed. There are the
8th core processor and it is good
On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote:
The purpose - search of changes in file system.
Sorting is a slow operation as well as hashing. Creation of a
tree, is equally in sorting.
So far the best result:
string[] rez;
foreach(str; m2) {
bool fFind; int j;
I want to make an application with use http2.d from packet arsd.
Where can I find the ready made for usage or how to create
cryptro.lib and ssl.lib for Windows 32 that are necessary for my
project?
On Tuesday, 25 July 2017 at 21:51:39 UTC, Adam D. Ruppe wrote:
On Tuesday, 25 July 2017 at 12:11:08 UTC, MGW wrote:
Where can I find the ready made for usage or how to create
cryptro.lib and ssl.lib for Windows 32 that are necessary for
my project?
Do you have the crypto.dll and ssl.dll? If
I need library for generation of QR codes. Who knows, give the
link.
On Wednesday, 8 November 2017 at 06:34:27 UTC, Andrew Edwards
wrote:
I'm having a little bit of problem calling D code from C++ and
would appreciate some assistance. First, given the following
C++ program wich compiles, links, and runs without any problem:
The useful material.
https://www.yout
On Tuesday, 21 November 2017 at 23:12:33 UTC, Markus wrote:
hi, im trying to interface a cpp class. I'd like to interface a
bigger library and I'm trying to figure out the minimum effort.
Possibly it will be interesting
https://www.youtube.com/watch?v=HTgJaRRfLPk
On Wednesday, 22 November 2017 at 08:29:26 UTC, MGW wrote:
Possibly it will be interesting
https://pp.userapi.com/c639524/v639524332/60240/uH3jnxrchik.jpg
is dmd a virus?
https://www.virustotal.com report:
Cybereason --> Malicious.779f29
VBA32 --> BScope.Trojan.DShell
string[] m = stdin.byLineCopy.array;
How to make strip() for each line in an expression ...
GC cleans memory using the FIFO paradigm. Is it possible to
switch GC to work using the LIFO paradigm?
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
Need help:
There' s a large text file (hundreds of thousands of lines).
The structure is as follows:
2345|wedwededwedwedwe ..
872625|rfrferwewweww .
23|rergrferfefer
It is necessary to sort this file by the first field having
received:
23|rergrferfefer...
2345|
// MGW 05.01.14
// We model in D object C ++ QByteArray from Qt.
//
// Windows: dmd st1.d
// Linux: dmd st1.d -L-ldl
import core.runtime; // Load DLL for Win
import std.stdio;// writeln
version(linux) {
import core.sys.posix.dlfcn
an
source code
of a file std\stdio.d with changes is presented more low.
private FILE* fopen(in char[] name, in char[] mode = "r")
@trusted // nothrow @nogc - mgw отключено из-за fromUtf8toAnsiW
{
import std.internal.cstring : tempCString;
version(Windows)
{
The decision, which I have applied using function
fromUtf8toAnsiW() already works correctly.
I use dmd 2.067.0
Hi, everybody!
DMD32 D Compiler v2.067.0
I try to cause the fputc function from CrtDLL.DLL and I receive a
mistake. Why?
import core.runtime; // Загрузка DLL Для Win
import std.stdio;// writeln
version(Windows) {
import std.c.windows.windows; // GetProcAddress для Windows
I found the solution. A problem in different structures of FILE
for MSVC and DMC. I take the pointer on structure of FILE from
CrtDLL.dll
Everything works!
// MGW 07.05.15
import core.runtime; // Загрузка DLL Для Win
import std.stdio;// writeln
version(Windows) {
import
Linux 32, dmd 2.067.0
I want to connect and execute function D from main() C++.
d1.d
import core.stdc.stdio;
extern (C++) void d1() {
printf("printf - exec d1()");
}
main_c1.cpp
#include
void d1(void);
int main(void) {
d1();
return 0;
}
compile
dmd
Hi!
My project has an error link:
Error 42: Symbol Undefined
_D6object9Exception6__ctorMFNaNbNfAyaAyakC6object9ThrowableZC9Exception
On dmd 2.067.* everything gathered without mistakes. Where to
look for a mistake?
Thanks to all! The problem is localized!
65 matches
Mail list logo