Adding deprecated to an enum member

2017-07-31 Thread Jeremy DeHaan via Digitalmars-d-learn
I got an error today because I added deprecated to an enum member. Is there a way to achieve this, or am I out of luck? If it isn't doable, should it be? Here's what I want: enum PrimitiveType { Points, Lines, LineStrip, Triangles, TriangleStrip, TriangleFan, Quads

Re: Adding deprecated to an enum member

2017-08-01 Thread Jeremy DeHaan via Digitalmars-d-learn
On Tuesday, 1 August 2017 at 02:06:27 UTC, dark777 wrote: I did as follows using deprecated may help you to elucidate in relation to this https://pastebin.com/NEHtWiGx Deprecating an entire module isn't really a solution though. I only want parts of an existing enum to be deprecated when they

Size of D bool vs size of C++ bool

2017-08-04 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm trying to do some binding code, and I know that C++ bool isn't defined to be a specific size like D's bool. That said, can I assume that the two are the same size on the most platforms? The only platforms I'm really interested in are Windows, Linux, OSX, iOS, FreeBSD, Android. The only thi

Re: Size of D bool vs size of C++ bool

2017-08-05 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 4 August 2017 at 20:38:16 UTC, Steven Schveighoffer wrote: On 8/4/17 4:16 PM, Jeremy DeHaan wrote: I'm trying to do some binding code, and I know that C++ bool isn't defined to be a specific size like D's bool. That said, can I assume that the two are the same size on the most platf

Re: returning D string from C++?

2017-08-05 Thread Jeremy DeHaan via Digitalmars-d-learn
On Saturday, 5 August 2017 at 20:17:23 UTC, bitwise wrote: I have a Windows native window class in C++, and I need a function to return the window title. [...] As long as you have a reachable reference to the GC memory SOMEWHERE, the GC won't reclaim it. It doesn't have to be on the stack a

How to change the file extension of generated doc files

2017-09-03 Thread Jeremy DeHaan via Digitalmars-d-learn
I can't find anywhere describing how to change the extension of the generated doc files. I've tried `-of.php`, but it still generates .html. I'm probably missing something here that's going to make me feel silly.

Where is TypeInfo stored?

2018-03-27 Thread Jeremy DeHaan via Digitalmars-d-learn
I was doing some experiments with the runtime and I didn't notice the TypeInfo instances being allocated by the GC. Are these put into the text or data segments? Is there anyway to find out more about this process?

Re: Where is TypeInfo stored?

2018-03-27 Thread Jeremy DeHaan via Digitalmars-d-learn
On Tuesday, 27 March 2018 at 19:06:38 UTC, Adam D. Ruppe wrote: On Tuesday, 27 March 2018 at 18:56:58 UTC, Jeremy DeHaan wrote: Are these put into the text or data segments? Yeah, they are in the data segment as static data (just like if you declared your own static array). Awesome, thanks.

Re: OSX Foundation framework D binding

2015-11-11 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 12 November 2015 at 05:50:09 UTC, Vadim Lopatin wrote: On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg wrote: On 2015-11-11 17:02, Jacob Carlborg wrote: I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in

Re: scope keyword

2015-11-19 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 19 November 2015 at 23:16:04 UTC, Spacen Jasset wrote: I thought scope was deprecated, but I see that this is still here: http://dlang.org/attribute.html#scope Is it just the uses on classes and local variables that are discouraged, but the use in a function signature will continu

Using a struct as a wrapper for an extern(C) opaque type, no default constructor, what do?

2015-12-16 Thread Jeremy DeHaan via Digitalmars-d-learn
Hi all. I'm interfacing to some C code which include an opaque type and some C functions that create and work with a pointer to that type. I want to wrap up everything in a struct, and the only thing that seems to bug me is initialization. Since it is C code, I obviously can't read the functio

Re: Using a struct as a wrapper for an extern(C) opaque type, no default constructor, what do?

2015-12-16 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 17 December 2015 at 03:43:58 UTC, Jakob Ovrum wrote: On Thursday, 17 December 2015 at 03:31:37 UTC, Jeremy DeHaan wrote: Hi all. I'm interfacing to some C code which include an opaque type and some C functions that create and work with a pointer to that type. I want to wrap up ever

Re: Using a struct as a wrapper for an extern(C) opaque type, no default constructor, what do?

2015-12-16 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 17 December 2015 at 04:59:20 UTC, Jakob Ovrum wrote: On Thursday, 17 December 2015 at 04:05:30 UTC, Jeremy DeHaan wrote: http://dpaste.com/3FH3W13 Also, I would be wary of lazy initialization. We have bad experiences with it for AAs and standard containers. A typical example wou

Struct destructors not always called?

2015-12-27 Thread Jeremy DeHaan via Digitalmars-d-learn
I was playing around with some code today and I noticed that in some cases struct destructors are not called. for example: impost std.stdio; SomeStruct global; void main() { SomeStruct inMain; writeln(global.thing); writeln(inMain.thing); writeln(getSomeInt()); } int getSomeInt()

Re: Struct destructors not always called?

2015-12-27 Thread Jeremy DeHaan via Digitalmars-d-learn
On Sunday, 27 December 2015 at 18:47:52 UTC, Adam D. Ruppe wrote: On Sunday, 27 December 2015 at 18:40:55 UTC, Jeremy DeHaan wrote: I was playing around with some code today and I noticed that in some cases struct destructors are not called. struct destructors are called when the struct ceases

Why does partial ordering of overloaded functions not take return type into account?

2016-02-19 Thread Jeremy DeHaan via Digitalmars-d-learn
module main; struct ThingOne { int thing = 1; } struct ThingTwo { float thing = 2; } struct Test { ThingOne thing() { return ThingOne(); } ThingTwo thing() { return ThingTwo(); } } voi

Re: Why does partial ordering of overloaded functions not take return type into account?

2016-02-20 Thread Jeremy DeHaan via Digitalmars-d-learn
On Saturday, 20 February 2016 at 12:29:21 UTC, Jonathan M Davis wrote: On Saturday, February 20, 2016 03:24:45 Jeremy DeHaan via Digitalmars-d-learn wrote: snip I'm unaware of any language that takes the return type into account when overloading. The type the expression test.thing() h

Re: Destructor order

2016-03-19 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 18 March 2016 at 15:07:53 UTC, Andrea Fontana wrote: On Friday, 18 March 2016 at 15:03:14 UTC, Steven Schveighoffer wrote: On 3/18/16 10:58 AM, Andrea Fontana wrote: On Friday, 18 March 2016 at 14:53:20 UTC, Steven Schveighoffer wrote: On 3/18/16 7:44 AM, Nicholas Wilson wrote: [..

How the heck is onInvalidMemoryOperationError() nothrow?

2016-05-05 Thread Jeremy DeHaan via Digitalmars-d-learn
In core.exception, we have a lovely function called onInvalidMemoryOperationError(). This function is marked as nothrow (plus other annotations). This function literally does nothing except throwing an error. How can it be marked as nothrow?

Re: How the heck is onInvalidMemoryOperationError() nothrow?

2016-05-06 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 6 May 2016 at 03:24:23 UTC, tsbockman wrote: On Friday, 6 May 2016 at 02:57:59 UTC, Jeremy DeHaan wrote: [...] From the spec (https://dlang.org/spec/function.html#nothrow-functions): "Nothrow functions can only throw exceptions derived from class Error." Throwing an Error is

What is up with building DMD (et al.) on Windows?

2016-05-09 Thread Jeremy DeHaan via Digitalmars-d-learn
I went to build DMD on Windows for the first time tonight and I have to say that it was a terrible experience when compared with Linux. First issue I ran into was having HOST_DC not being set. I'm not sure if the DMD installer is supposed to do this or if I needed to take care of it, but it w

Re: What is up with building DMD (et al.) on Windows?

2016-05-24 Thread Jeremy DeHaan via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:30:44 UTC, Vladimir Panteleev wrote: On Tuesday, 10 May 2016 at 04:48:23 UTC, Jeremy DeHaan wrote: After DMD is built, other things keep getting built by DMC. I get more than a few errors due to having an eof character on the first line of some .h files, or somet

Re: What is up with building DMD (et al.) on Windows?

2016-05-24 Thread Jeremy DeHaan via Digitalmars-d-learn
On Wednesday, 11 May 2016 at 14:30:44 UTC, Vladimir Panteleev wrote: On Tuesday, 10 May 2016 at 04:48:23 UTC, Jeremy DeHaan wrote: Building DMD, Phobos, and druntime on Linux is so easy and straight forward. It all works as expected. What's up with building DMD on Windows? For historical reas

Re: Bug in Rdmd?

2016-06-13 Thread Jeremy DeHaan via Digitalmars-d-learn
On Tuesday, 14 June 2016 at 01:05:46 UTC, Jonathan Marler wrote: This code doesn't seem to work with rdmd. Is this a bug? import std.stdio : byLine; int main(string[] args) { foreach(line; stdin.byLine) { } return 0; } Compiler Output: Error: module std.stdio import 'byLi

Problem with code coverage. No .lst files?

2014-04-24 Thread Jeremy DeHaan via Digitalmars-d-learn
Hey all, I tried to use code coverage analysis for the first time tonight. I added the -cov switch to my unit test build, but no matter what I do, I can't seem to locate the produced .lst files. Is there something I should know that isn't in the docs that I might be doing wrong? I'm not sure

Re: Problem with code coverage. No .lst files?

2014-04-25 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 25 April 2014 at 04:23:45 UTC, Ali Çehreli wrote: On 04/24/2014 08:32 PM, Jeremy DeHaan wrote: > added the -cov switch to my unit test build Then you must execute the program. :) Ali I did, but still nothing. I even tried using the switch in a debug build and the same thing happe

Re: Problem with code coverage. No .lst files?

2014-04-26 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 25 April 2014 at 08:20:37 UTC, Jeremy DeHaan wrote: On Friday, 25 April 2014 at 04:23:45 UTC, Ali Çehreli wrote: On 04/24/2014 08:32 PM, Jeremy DeHaan wrote: > added the -cov switch to my unit test build Then you must execute the program. :) Ali I did, but still nothing. I even t

Re: Problem with code coverage. No .lst files?

2014-04-26 Thread Jeremy DeHaan via Digitalmars-d-learn
On Sunday, 27 April 2014 at 00:37:39 UTC, Ali Çehreli wrote: So, under Linux, if I start the program as test/wont then the .lst gets generated in the current directory. Ali Just tried that in Windows, and the same thing happened. Weird! I'll be sure to file a bug report. Thanks for the confi

Building 32bit program with MSVC?

2014-05-29 Thread Jeremy DeHaan via Digitalmars-d-learn
I know that we can use MSVC to build a 64 bit program, but is it also possible to use it to build a 32 bit program as well?

Re: Building 32bit program with MSVC?

2014-05-30 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 May 2014 at 20:48:44 UTC, Kagamin wrote: You can try ldc, which uses mingw toolchain, it's probably compatible with msvc. I don't necessarily need to do this, I was just wondering if it was possible. Mostly because MSVC provides a lot of import and static libraries that DMC does

Re: Passing Command Line Arguments to a new Thread

2014-08-07 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 7 August 2014 at 18:23:26 UTC, Nordlöw wrote: What is the best way to forward a string[] as argument to a function called through std.concurrency.spawn(). I need this in the following example where I start the vibe.d event loop in the main thread (the only way I've managed to get

Identifying 32 vs 64 bit OS?

2014-08-10 Thread Jeremy DeHaan via Digitalmars-d-learn
I am looking at these versions as described here: http://dlang.org/version.html There are X86 and X86_64 version identifiers, but these specifically mention that they are versions for the processor type. Can they also be used to determine if the OS is running in 32 vs 64 bits?

Re: Identifying 32 vs 64 bit OS?

2014-08-12 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 11 August 2014 at 06:17:22 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 11 Aug 2014 05:18:59 + Jeremy DeHaan via Digitalmars-d-learn wrote: why do you need that info? D types has well-defined sizes (i.e uint is always 32 bits, and so on). I came up with a better

Very vague compiler error message

2014-08-12 Thread Jeremy DeHaan via Digitalmars-d-learn
I recently got this error messege when building my library: dmd: cppmangle.c:154: void CppMangleVisitor::cpp_mangle_name(Dsymbol*): Assertion `0' failed. I have no idea what it means and haven't found much information about it. I think I have narrowed it down to the file that is giving this

Re: Very vague compiler error message

2014-08-12 Thread Jeremy DeHaan via Digitalmars-d-learn
Awesome, thanks everyone. I'll take the suggestion to use Dustmite as an excuse to familiarize myself with it, but if normally extern(C++) types cause it I know just where to look.

Re: Very vague compiler error message

2014-08-14 Thread Jeremy DeHaan via Digitalmars-d-learn
On Thursday, 14 August 2014 at 13:47:58 UTC, Théo Bueno wrote: On Thursday, 14 August 2014 at 13:28:03 UTC, bearophile wrote: Théo Bueno: Same issue here with dsfml-audio, this is really annoying :/ Have you filed the issue? Bye, bearophile Jebbs filed an issue on his bugtracker : https:/

Re: Very vague compiler error message

2014-08-17 Thread Jeremy DeHaan via Digitalmars-d-learn
I didn't have access to my compute for longer than I thought, but I finally got around to this. After some messing around, I not only managed to track down the cause, but I got it fixed and the Audio module for DSFML is back to where it was. In one of my D classes, SoundStream, I defined a

Error with constraints on a templated fuction

2014-08-25 Thread Jeremy DeHaan via Digitalmars-d-learn
I've done things like this before with traits and I figured that this way should work as well, but it gives me errors instead. Perhaps someone can point out my flaws. immutable(T)[] toString(T)(const(T)* str) if(typeof(T) is dchar)//this is where the error is { return str[0..strlen(str

Re: Error with constraints on a templated fuction

2014-08-25 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 25 August 2014 at 15:59:38 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 25 Aug 2014 15:48:10 + Jeremy DeHaan via Digitalmars-d-learn wrote: It compiles if I remove the 'if(typeof(T) is dchar)' section. Any thoughts? "is" should be used as function. h

Re: Error with constraints on a templated fuction

2014-08-25 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 25 August 2014 at 15:52:20 UTC, bearophile wrote: Jeremy DeHaan: It compiles if I remove the 'if(typeof(T) is dchar)' section. Any thoughts? Try: if (is(T == dchar)) Bye, bearophile That one compiles, and I'm assuming it works. I didn't know you could use is this way. I've onl

Re: Error with constraints on a templated fuction

2014-08-25 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 25 August 2014 at 16:20:24 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 25 Aug 2014 16:11:27 + Jeremy DeHaan via Digitalmars-d-learn wrote: Is its ability to be used as a function like this documented anywhere? I looked and could not find it. http://dlang.org

Initializing D in C to use?

2014-10-17 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm starting a new project, and I plan on creating a C interface in case other languages want to use it. I remember reading something(but my googlefu is weak today) about having to initialize the runtime if you are using D inside another language. Can anyone confirm this is the case? I just w

Re: Recommended GUI library?

2014-10-17 Thread Jeremy DeHaan via Digitalmars-d-learn
I highly recommend gtkD. It works on Windows, OSX, and Linux and provides a very nice OO interface to Gtk+. http://gtkd.org/

Why was scope for allocating classes on the stack marked for deprecation?

2014-10-17 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm curious as to why using scope to allocate classes on the stack was marked for future deprecation. I mean, sure it could be potentially unsafe, but the new library solution (using std.typecons.scoped) does the exact same thing and is just as unsafe for the same reasons, is it not? I would

Re: Initializing D in C to use?

2014-10-17 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 17 October 2014 at 17:21:11 UTC, Adam D. Ruppe wrote: On Friday, 17 October 2014 at 17:14:30 UTC, K.K. wrote: Sorry if this isn't the most helpful answer but.. Do you have Adam Ruppe's book? buy my book too, and write amazon reviews :P A lot of the topics in there were chosen becau

DDoc module description?

2014-10-18 Thread Jeremy DeHaan via Digitalmars-d-learn
Although perhaps unnecessary, I added DDoc documentation to my module for a short description of the body. This showed up in the place I wanted it to be in when I built the html documentation, so I was pretty happy. (below the module name and before any module members) I then went to override

Re: DDoc module description?

2014-10-19 Thread Jeremy DeHaan via Digitalmars-d-learn
Thanks for the reply. I just went through it and I didn't see anything that was missed. I'll post this here so that maybe someone can see something I am missing. DDOC = href="stylesheets/stylesheet.css"> $(TITLE) https://github.com/Jebbs/DSFML";>View on GitHub DSFML

Re: DDoc module description?

2014-10-19 Thread Jeremy DeHaan via Digitalmars-d-learn
On Sunday, 19 October 2014 at 16:59:10 UTC, Gary Willoughby wrote: On Sunday, 19 October 2014 at 16:44:25 UTC, Jeremy DeHaan wrote: The problem seems to be when I do something like this. *blah.d* ///A module that contains blahblahblah. module something.blah; //Stuff goes here What will end u

Re: DDoc module description?

2014-10-19 Thread Jeremy DeHaan via Digitalmars-d-learn
That's ok though. I can live with out it. I'll look through the bugzilla site and see if I can find a bug report for this or open up a new one. On a side note, is there any way that I can redefine the DDOC macro (or any other macro) once and have it be used for every file? That was the only t

Re: DDoc module description?

2014-10-19 Thread Jeremy DeHaan via Digitalmars-d-learn
On Sunday, 19 October 2014 at 18:19:26 UTC, Gary Willoughby wrote: On Sunday, 19 October 2014 at 17:43:51 UTC, Jeremy DeHaan wrote: That's ok though. I can live with out it. I'll look through the bugzilla site and see if I can find a bug report for this or open up a new one. On a side note, i

Re: Audio file read/write?

2014-11-08 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 7 November 2014 at 11:55:16 UTC, ponce wrote: Pretty sure libsndfile can read .wav, .au, .ogg but not mp3 No commercial usage unless you pay a licence. https://github.com/p0nce/DerelictSndFile.git Not sure about the others, but you can use sndfile in a commercial project for free a

The package feature is ignored when the file name is package.di

2014-12-12 Thread Jeremy DeHaan via Digitalmars-d-learn
Is this on purpose? Granted, I almost never use interface files, but I had a whim to use them for what I was working on today. Everything worked fine when I renamed the file to package.d, but apparently package.di is not acceptible.

Segmentation fault after having a certain number of elements in an array?

2014-12-13 Thread Jeremy DeHaan via Digitalmars-d-learn
I'll be trying to narrow it down even more tomorrow, but I was hoping somone here might have some insight into this weird issue I am having. I have a dynamic array of shorts that I had been trying to append to (capturing sound data). I kept getting a segfault when doing the append, and have n

Re: Segmentation fault after having a certain number of elements in an array?

2014-12-13 Thread Jeremy DeHaan via Digitalmars-d-learn
I should also mention that this is on Linux. I haven't tried on OSX or Windows yet.

Re: Segmentation fault after having a certain number of elements in an array?

2014-12-13 Thread Jeremy DeHaan via Digitalmars-d-learn
On Saturday, 13 December 2014 at 09:24:51 UTC, Paul wrote: On Saturday, 13 December 2014 at 08:59:19 UTC, Jeremy DeHaan wrote: for(int i = 0; i m_samples.length +=1; You are testing i against an ever-increasing limit aren't you, so it's an infinite loop. Not really. Whe

Re: Segmentation fault after having a certain number of elements in an array?

2014-12-13 Thread Jeremy DeHaan via Digitalmars-d-learn
On Saturday, 13 December 2014 at 09:47:40 UTC, Artem Tarasov wrote: On Saturday, 13 December 2014 at 08:59:19 UTC, Jeremy DeHaan wrote: I'll be trying to narrow it down even more tomorrow, but I was hoping somone here might have some insight into this weird issue I am having. Could you upload

xcb error for core.thread's Thread.join

2014-12-28 Thread Jeremy DeHaan via Digitalmars-d-learn
Hey all, I've never gotten any xcb errors with just regular D code before, but maybe I just haven't done anything that would have caused them. I can't say I actually know much about how these things work, but does D not use xcb when it does threading on Linux? I'm not really doing anything

Re: xcb error for core.thread's Thread.join

2014-12-28 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan wrote: Hey all, I've never gotten any xcb errors with just regular D code before, but maybe I just haven't done anything that would have caused them. I can't say I actually know much about how these things work, but does D not use x

Re: xcb error for core.thread's Thread.join

2014-12-28 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 29 December 2014 at 06:34:02 UTC, Jeremy DeHaan wrote: On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan wrote: Hey all, I've never gotten any xcb errors with just regular D code before, but maybe I just haven't done anything that would have caused them. I can't say I ac

Re: xcb error for core.thread's Thread.join

2014-12-29 Thread Jeremy DeHaan via Digitalmars-d-learn
On Monday, 29 December 2014 at 07:23:32 UTC, Rikki Cattermole wrote: On 29/12/2014 7:39 p.m., Jeremy DeHaan wrote: On Monday, 29 December 2014 at 06:34:02 UTC, Jeremy DeHaan wrote: On Monday, 29 December 2014 at 06:26:04 UTC, Jeremy DeHaan wrote: Hey all, I've never gotten any xcb errors with

Deducing a template retrun parameter type based on an assignment?

2015-01-29 Thread Jeremy DeHaan via Digitalmars-d-learn
I have a template fuction that looks like this: immutable(T)[] getString(T)() const if (is(T == dchar)||is(T == wchar)||is(T == char)) Basically, I was hoping that the type would be deduced based on the prameter that was being assigned to like so. string ret = thing.getString(); Apparently t

Re: Deducing a template retrun parameter type based on an assignment?

2015-01-29 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 January 2015 at 06:58:58 UTC, Vlad Levenfeld wrote: On Friday, 30 January 2015 at 06:35:31 UTC, Jeremy DeHaan wrote: A bunch of stuff for template type deduction to work, you have to supply an argument. Your type signature would need to look like this: immutable(T)[] getStri

Re: windows wininet library

2015-02-01 Thread Jeremy DeHaan via Digitalmars-d-learn
On Sunday, 1 February 2015 at 07:32:05 UTC, ketmar wrote: how can i use wininet.dll from D? i got bindings from https://github.com/ CS-svnmirror/dsource-bindings-win32.git, and then i tried to create wininet.lib with implib.exe from DMC package. no matter how i tried, the resulting "wininet.lib

Re: How to make Application bundle from Executable? (Mac)

2015-02-19 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 20 February 2015 at 03:26:47 UTC, Gan wrote: I managed to copy an application bundle and change stuff inside it to run my executable, but it was very manual and kinda hackish. Also I can't get my application to load images that I place in the Resources folder(or any folder in the bun

gdc and ldc command line examples?

2015-03-30 Thread Jeremy DeHaan via Digitalmars-d-learn
Hey all, I am finally working on moving out of dmd territory and playing with gdc and ldc. I was hoping that I could get some links to some example command lines. I'm mainly interested command lines regarding linking to libraries and building static libraries. My guess is that gdc will funct

Re: How to generate D binding with SWIG?

2015-04-06 Thread Jeremy DeHaan via Digitalmars-d-learn
Do you even need to use swig? It looks like gdal has a C interface. I think that htod would be what you're looking for http://dlang.org/htod.html

What is the correct way to run the auto-tester tests on FreeBSD?

2016-08-20 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm trying to figure out how to run the auto-tester tests locally on FreeBSD and I'm running into an issue. I managed to get the tests to run on a 32 bit after a fashion, but I can't seem to get the tests to run successfully on the 64 bit version. Here's what I've done so far. git cloned dmd,

Adding linker paths with spaces using dmd and msvc toolchain

2016-12-29 Thread Jeremy DeHaan via Digitalmars-d-learn
I have a path to where some .libs are, and this path has some spaces in it. Using dmd and the msvc toolchain, I only seem to be able to correctly link .lib files if I pass them to the compiler with their full paths, or if I give the linker a relative path. When I add -L/LIBPATH:"path" to the c

Re: Adding linker paths with spaces using dmd and msvc toolchain

2016-12-29 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 December 2016 at 04:56:59 UTC, Jerry wrote: On Friday, 30 December 2016 at 03:51:13 UTC, Jeremy DeHaan wrote: How does one correctly add a linker path that has spaces? The quotes get consumed by the command line. The way DMD spawns the linker by creating a new string with all th

Re: Adding linker paths with spaces using dmd and msvc toolchain

2016-12-30 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 December 2016 at 04:56:59 UTC, Jerry wrote: On Friday, 30 December 2016 at 03:51:13 UTC, Jeremy DeHaan wrote: How does one correctly add a linker path that has spaces? The quotes get consumed by the command line. The way DMD spawns the linker by creating a new string with all th

Re: Adding linker paths with spaces using dmd and msvc toolchain

2016-12-31 Thread Jeremy DeHaan via Digitalmars-d-learn
On Friday, 30 December 2016 at 21:51:32 UTC, Rainer Schuetze wrote: On 30.12.2016 19:24, Jeremy DeHaan wrote: On Friday, 30 December 2016 at 04:56:59 UTC, Jerry wrote: On Friday, 30 December 2016 at 03:51:13 UTC, Jeremy DeHaan wrote: How does one correctly add a linker path that has spaces?

MSVC path on windows

2017-01-12 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm trying to automate a build process for a project of mine, and I want to get the path to the MSVC toolchain DMD is using. I don't want to hard code any paths that may not work on some people's set-ups. I know there are some environmental variables such as VS140COMNTOOLS, VS120COMNTOOLS, et

Issue in _d_dso_registry on Linux when unloading DSO's

2017-04-03 Thread Jeremy DeHaan via Digitalmars-d-learn
I'm running into this issue when I compile DRuntime in debug. In sections_elf_shared.d, there's an assert on line 454 (assert(pdso._tlsSize == _tlsRanges.back.length);). Because of this line, I get an assertion thrown, where the actual issue is that _tlsRanges is empty and thus has no "back". T