On Friday, 15 May 2015 at 19:49:30 UTC, John Colvin wrote:
On Friday, 15 May 2015 at 19:39:53 UTC, TJB wrote:
Off the top of my head: does adding -L-L$(pwd) help?
This is what I get:
$ dmd main.d -L-L$(pwd) -lhello
Error: unrecognized switch '-lhello'
Sorry if this is completely elementary
Off the top of my head: does adding -L-L$(pwd) help?
This is what I get:
$ dmd main.d -L-L$(pwd) -lhello
Error: unrecognized switch '-lhello'
Sorry if this is completely elementary and I am being quite dumb.
Thanks,
TJB
I have built a toy dynamic shared library on Mac OS X (in C), and
I have verified that it works from C. Now I would like to call it
from D. So I have created the following interface file:
$ cat hello.di
extern (C):
void printHelloWorld();
which I try to compile and run. But I get the
I'm sure this question has been asked a thousand times. I've even
asked similar questions in the past (I've been away for quite a
while). But all of the tutorials that I have found assume quite a
lot and leave a lot to be inferred. Is there a simple step by
step tutorial demonstrating how to
On Thursday, 7 August 2014 at 15:11:48 UTC, TJB wrote:
I am trying to read data in from a csv file into a struct, and
then turn around and write that data to binary format.
Here is my code:
import std.algorithm;
import std.csv;
import stdio = std.stdio;
import std.stream;
align(1) struct
I am trying to read data in from a csv file into a struct, and
then turn around and write that data to binary format.
Here is my code:
import std.algorithm;
import std.csv;
import stdio = std.stdio;
import std.stream;
align(1) struct QuotesBin
{
int qtim;9 int bid;
int ofr;
int
I am trying to find the max and min values in an associative
array. Say I have:
double[char] bids;
bid['A'] = 37.50;
bid['B'] = 38.11;
bid['C'] = 36.12;
How can I find the max and min values. I am thinking that I need
to use max and min functions from std.algorithm, but not sure how
to.
Justin,
That's it! Perfect - thanks!!
TJB
Do you just need the min and max values or do you also need the
keys of
those values? If the former, here's a paste:
http://dpaste.dzfl.pl/0bbf31278a25
This is exactly what I was thinking. Thanks so much for your
help!
TJB
Just a little something I made for you. Untested of course. But
takes an argument from cli, which is a glob. Foreach file under
current working directory, if its a file write out processing.
(I gave std.stdio an alias
I am trying to build some simple command line applications that I
have written in python as a way to learn D. Can you give some
examples for me? For instance, I think I remember once seeing
somewhere in the documentation an example that took several D
files and compiled them all by running
On Monday, 4 August 2014 at 21:58:09 UTC, maarten van damme via
Digitalmars-d-learn wrote:
I am a little bit confused as to what you want.
There is a command line example at dlang.org, and there exists
a program
(rdmd) that compiles several D files and runs them.
http://dlang.org/rdmd.html
Is it possible to write a library that is callable from C without
the enduser even knowing it was written in D? That is, can a C
programmer use the library as though it were written in C
straightforwardly? Or for that matter, by an enduser programming
in Python or Lua where the library is
12 matches
Mail list logo