On Monday, 6 February 2023 at 06:59:09 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On other platforms the -Lfile I think would work.
On Windows you have to link against the import library not DLL
directly.
You can pass it to the compiler:
$ dmd -i "-L/LIBPATH:C:\Program
On other platforms the -Lfile I think would work.
On Windows you have to link against the import library not DLL directly.
You can pass it to the compiler:
$ dmd -i "-L/LIBPATH:C:\Program Files\PostgreSQL\15\lib" pq.lib app.d
Should work. Sorry, I should have revisted this from the get go,
I'm trying out ImportC, but I can't get even the "Quick Example"
running.
> dmd -v .\source\foobar.c
predefs DigitalMars LittleEndian D_Version2 all Windows
Win32 CRuntime_Microsoft CppRuntime_Microsoft D_InlineAsm
D_InlineAsm_X86 X86 assert D_PreConditions D_PostConditions
On Monday, 6 February 2023 at 05:45:35 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Ah doh, MSVC link doesn't use -L.
$ dmd -i "-L/LIBPATH:C:\Program Files\PostgreSQL\15\lib" -Llpq
app.d
I think that is the option you want.
Worst case scenario just copy the files to your working
directory
Ah doh, MSVC link doesn't use -L.
$ dmd -i "-L/LIBPATH:C:\Program Files\PostgreSQL\15\lib" -Llpq app.d
I think that is the option you want.
Worst case scenario just copy the files to your working directory and it
should find it without the additional search path.
On 06/02/2023 6:16 PM, Alexander Zhirov wrote:
C:\sources\pxe-restore\source>dmd -i app.d -L'-LC:\Program
Files\PostgreSQL\15\lib' -Llpq
Source files go after flags.
$ dmd -i -L'-LC:\Program Files\PostgreSQL\15\lib' -Llpq app.d
On Monday, 6 February 2023 at 05:20:33 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Source files go after flags.
$ dmd -i -L'-LC:\Program Files\PostgreSQL\15\lib' -Llpq app.d
For some reason, the `obj` file is link instead of the library.
```sh
C:\sources\pxe-restore\source>dmd
On Sunday, 5 February 2023 at 13:37:16 UTC, user1234 wrote:
try
```
dmd -i app.d -L'-LC:\Program Files\PostgreSQL\15\lib' -Llpq
```
the first linker command gives a search path, the second a
libname.
It doesn't work
```sh
C:\sources\pxe-restore\source>dmd -i app.d -L'-LC:\Program
Thanks.
update: just set up a Manjaro vm and it seems to work, I guess
I'll have no choice but to switch to Manjaro then if I want to
use sfml
I do not agree, that a compiler that allows a programmer to
misuse a type, should be seen as 'a feature'.
If that's the kind of 'power' D programmers want, then D is not
for me.
Eh, I don't think I would _quit_ D because of this issue, but
it's definitely something that bothers me (more
On Sunday, 5 February 2023 at 23:53:35 UTC, Ali Çehreli wrote:
On 2/5/23 14:40, ProtectAndHide wrote:
> On Sunday, 5 February 2023 at 10:51:51 UTC, thebluepandabear
wrote:
>>
>> It's not a terrible workaround to be honest.
>>
>
> The 'terrible' part is this:
>
> - the compiler will allow
On Sunday, 5 February 2023 at 23:53:35 UTC, Ali Çehreli wrote:
On 2/5/23 14:40, ProtectAndHide wrote:
> On Sunday, 5 February 2023 at 10:51:51 UTC, thebluepandabear
wrote:
>>
>> It's not a terrible workaround to be honest.
>>
>
> The 'terrible' part is this:
>
> - the compiler will allow
On Sunday, 5 February 2023 at 23:50:35 UTC, Ali Çehreli wrote:
On 2/5/23 02:57, thebluepandabear wrote:
> When dealing with contexts, or for when you want a clear
context in your
> codebase, namespaces can be a life saver
Can you give an example of a D problem that namespaces could
solve? I
I have two AliasSeqs: one containing a function's parameters
(SourceSeq), the other containing the types I want to convert
said parameters to (TargetSeq). I'd use something like staticMap
to call the conversion function with both a parameter from
SourceSeq and a type from TargetSeq, and return
On 2/5/23 14:40, ProtectAndHide wrote:
> On Sunday, 5 February 2023 at 10:51:51 UTC, thebluepandabear wrote:
>>
>> It's not a terrible workaround to be honest.
>>
>
> The 'terrible' part is this:
>
> - the compiler will allow you to declare a variable of type Algo
> - the compiler will
On 2/5/23 02:57, thebluepandabear wrote:
> When dealing with contexts, or for when you want a clear context in your
> codebase, namespaces can be a life saver
Can you give an example of a D problem that namespaces could solve? I
have been with D for 14 years and haven't missed namespaces from
On Sunday, 5 February 2023 at 22:40:09 UTC, ProtectAndHide wrote:
..
module test;
import std;
static final class Algo
{
@disable this();
static this()
{
Message = "Hello!";
}
static:
string Message;
void drawLine() {};
}
void main()
{
Algo foo1
On Sunday, 5 February 2023 at 10:51:51 UTC, thebluepandabear
wrote:
It's not a terrible workaround to be honest.
The 'terrible' part is this:
- the compiler will allow you to declare a variable of type Algo
- the compiler will allow you to declare an array with elements
of type Algo
-
On 05/02/2023 10:01 PM, Tamas wrote:
On the surface, betterC seems to be perfect for this case. How would YOU
do it (Adam, Richard)?
BtW, gstreamer also has D bindings, and maybe in the future I'll use
those. I suspect that Adam's suggestions have a stronger relevance to
that case, right?
On Sunday, 5 February 2023 at 11:52:01 UTC, Alexander Zhirov
wrote:
On Saturday, 4 February 2023 at 15:56:41 UTC, Richard (Rikki)
Andrew Cattermole wrote:
[...]
I don't understand why the compiler doesn't see the library.
```sh
User@WIN-D3SHRBHN7F6 MINGW64 /home/user/pxe-restore/source
# ls
On Saturday, 4 February 2023 at 15:56:41 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On Windows you don't link directly against a DLL.
You link against a static library (.lib) of the same name.
The binding doesn't change between a static library and a
shared library as long as you're
On Sunday, 5 February 2023 at 10:51:51 UTC, thebluepandabear
wrote:
{
@disable this();
static this()
{
Message = "Hello!";
}
static:
string Message;
void drawLine() {};
}
It's not a terrible workaround to be honest.
`static class` does have a use when
{
@disable this();
static this()
{
Message = "Hello!";
}
static:
string Message;
void drawLine() {};
}
It's not a terrible workaround to be honest.
`static class` does have a use when it's nested, so it might
create some conflicts if such a feature
On Monday, 30 January 2023 at 21:54:49 UTC, thebluepandabear
wrote:
...
Interesting, so maybe there is a use case for a purely static
type or namespace?
The standard library as well uses `final abstract class` a
couple of times, which can also be thought as a type of
namespace.
All these
On Sunday, 5 February 2023 at 00:27:19 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 05/02/2023 1:20 PM, Adam D Ruppe wrote:
Even module imports can fail because betterC disables
outputting the module data info, even if it would otherwise be
required by language rules, despite it not using
On Sunday, 5 February 2023 at 00:20:24 UTC, Adam D Ruppe wrote:
There's a lot of things described in the documentation that
don't actually work. D can be an *extremely* productive
language if you know which parts to focus on, but most the
newer hyped features just don't deliver.
The table of
On Saturday, 4 February 2023 at 19:44:15 UTC, bachmeier wrote:
On Saturday, 4 February 2023 at 18:29:41 UTC, Tamas wrote:
What's the reason to prefer LDC over DMD?
Anyone that cares about performance will use LDC rather than
DMD. It's hard to imagine a case where someone would want
betterC
27 matches
Mail list logo