Jerry , dans le message (digitalmars.D.learn:29830), a écrit :
trav...@phare.normalesup.org (Christophe) writes:
Jerry Quinn , dans le message (digitalmars.D.learn:29763), a écrit :
What I really want is a shared fifo where the input is lines from a
file, and many workers grab something
what is the error message ?
Am 29.09.2011, 06:51 Uhr, schrieb Cheng Wei riverch...@gmail.com:
extern(C) {
struct ab;
}
ab*[int] map;
void main() {
map.clear();
}
Cannot be compiled. Why?
Thanks.
Just use void* for opaque pointers in D.
On 09/29/2011 01:28 PM, Trass3r wrote:
Am 29.09.2011, 06:51 Uhr, schrieb Cheng Wei riverch...@gmail.com:
extern(C) {
struct ab;
}
ab*[int] map;
void main() {
map.clear();
}
Cannot be compiled. Why?
Thanks.
Just use void* for opaque pointers in D.
Or an empty struct.
struct ab{}
Due to process separation, the following won't work:
script.sh:
#!/bin/sh
SOME_VAR=foobar
test.d:
import std.process;
void main()
{
system(./script.sh);
assert(environment[SOME_VAR] == foobar);
}
This, of course, is because the script is run in a totally separate process
(AIUI). The
It's my first foray into the arcana of makefiles and command line compiling.
My makefile looks like this:
IMPORT = -IC:\Dlang\dmd2\src\ext\Derelict2\import
LIB_PATHS = -LC:\Dlang\dmd2\src\ext\Derelict2\lib
LIB_INCLUDES = DerelictSDL.lib DerelictGL.lib DerelictUtil.lib
all:
dmd
No it's not the same for Windows. On Windows you have to use -L+, e.g.:
dmd myfile.d -L+path/to/libs mylib.lib
Documented here:
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD#PassingsearchdirectoriesforstaticlibraryfilestoOptlink
Damn what a big hashtag, lol.
On Thu, 29 Sep 2011 14:32:28 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
No it's not the same for Windows. On Windows you have to use -L+, e.g.:
dmd myfile.d -L+path/to/libs mylib.lib
That's because +path/to/libs is the search-path parameter for OPTLINK. -L
goes before all
On 9/29/11, Steven Schveighoffer schvei...@yahoo.com wrote:
On Thu, 29 Sep 2011 14:32:28 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
No it's not the same for Windows. On Windows you have to use -L+, e.g.:
dmd myfile.d -L+path/to/libs mylib.lib
That's because +path/to/libs is
On Thu, 29 Sep 2011 13:31:13 -0400, Nick Sabalausky wrote:
Due to process separation, the following won't work:
script.sh:
#!/bin/sh
SOME_VAR=foobar
test.d:
import std.process;
void main()
{
system(./script.sh);
assert(environment[SOME_VAR] == foobar);
}
This, of course,
On Thu, 29 Sep 2011 15:28:56 -0400, Roderick Gibson knit...@gmail.com
wrote:
On 9/29/2011 11:52 AM, Andrej Mitrovic wrote:
On 9/29/11, Steven Schveighofferschvei...@yahoo.com wrote:
On Thu, 29 Sep 2011 14:32:28 -0400, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
No it's not the same
Odd, I never have to do double backslashes. Maybe it's a problem with
make. Personally I just use batch files, I kind of got used to them
for simple projects. For everything else a D script is my handy tool.
Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.v2k6axvveav7ka@localhost.localdomain...
On Thu, 29 Sep 2011 13:31:13 -0400, Nick Sabalausky a@a.a wrote:
Due to process separation, the following won't work:
script.sh:
#!/bin/sh
SOME_VAR=foobar
test.d:
import
Roderick Gibson knit...@gmail.com wrote in message
news:j62d4i$1d8l$1...@digitalmars.com...
It's my first foray into the arcana of makefiles and command line
compiling.
My makefile looks like this:
IMPORT = -IC:\Dlang\dmd2\src\ext\Derelict2\import
LIB_PATHS =
Nick Sabalausky a@a.a wrote in message
news:j62msu$205t$1...@digitalmars.com...
Roderick Gibson knit...@gmail.com wrote in message
news:j62d4i$1d8l$1...@digitalmars.com...
It's my first foray into the arcana of makefiles and command line
compiling.
My makefile looks like this:
IMPORT =
On Thu, 29 Sep 2011 16:30:54 -0400, Roderick Gibson knit...@gmail.com
wrote:
On 9/29/2011 1:02 PM, Steven Schveighoffer wrote:
On Thu, 29 Sep 2011 15:28:56 -0400, Roderick Gibson knit...@gmail.com
wrote:
On 9/29/2011 11:52 AM, Andrej Mitrovic wrote:
On 9/29/11, Steven
On Thu, 29 Sep 2011 17:02:28 -0400, Nick Sabalausky a@a.a wrote:
Graham Fawcett fawc...@uwindsor.ca wrote in message
news:j62ido$1n0s$1...@digitalmars.com...
On Thu, 29 Sep 2011 13:31:13 -0400, Nick Sabalausky wrote:
Due to process separation, the following won't work:
script.sh:
#!/bin/sh
Hi all. What do you about WinRT? I think this new APIs could be a
very interesting point for D... they are open to any language and
i think that D is perfect to work with them. What's your opinion?
Best regards
On 9/29/2011 2:15 PM, Nick Sabalausky wrote:
Nick Sabalauskya@a.a wrote in message
news:j62msu$205t$1...@digitalmars.com...
Roderick Gibsonknit...@gmail.com wrote in message
news:j62d4i$1d8l$1...@digitalmars.com...
It's my first foray into the arcana of makefiles and command line
compiling.
RenatoL ren...@relhost.net wrote in message
news:j62nl3$21g5$1...@digitalmars.com...
Hi all. What do you about WinRT? I think this new APIs could be a
very interesting point for D... they are open to any language and
i think that D is perfect to work with them. What's your opinion?
Best
RenatoL ren...@relhost.net wrote in message
news:j62q4v$25tn$1...@digitalmars.com...
Eh eh, it may be strange something good come out from MS... but i
think this time we could look at this with interest this an
object replacement for win32 and the OS exposes it in an open
way... i believe
On 9/29/2011 2:39 PM, Nick Sabalausky wrote:
Roderick Gibsonknit...@gmail.com wrote in message
news:j62nvo$2237$1...@digitalmars.com...
On 9/29/2011 2:15 PM, Nick Sabalausky wrote:
Nick Sabalauskya@a.a wrote in message
news:j62msu$205t$1...@digitalmars.com...
Roderick
The problem is that the void* cannot convert back to AB* when we want to
use it in c library.
Just don't understand why the cast(AB*)p (p is void *) needs to know the
size of AB. Is there any unsafe cast which can blindly cast the
pointers?
Thanks a lot. This solves the problem.
However, it breaks the abstractness. Now in D side, we can call
auto v = ab(). This does not make sense, because then v cannot be used
in the C library.
I don't understand why when we manipulate AB*, D compiler needs to know
the size of struct ab. Moreover,
25 matches
Mail list logo