Re: dlib 0.19.1 seems to be failing linking with ldc2

2020-08-02 Thread jeff thompson via Digitalmars-d-learn
On Friday, 31 July 2020 at 22:26:26 UTC, jeff thompson wrote: On Friday, 31 July 2020 at 20:07:26 UTC, Dennis wrote: On Friday, 31 July 2020 at 14:17:14 UTC, jeff thompson wrote: dlib.lib(dlib.audio.io.wav.obj) : error LNK2019: unresolved external symbol _D4core8internal7switch___T14__switch_e

Re: dlib 0.19.1 seems to be failing linking with ldc2

2020-07-31 Thread jeff thompson via Digitalmars-d-learn
On Friday, 31 July 2020 at 20:07:26 UTC, Dennis wrote: On Friday, 31 July 2020 at 14:17:14 UTC, jeff thompson wrote: dlib.lib(dlib.audio.io.wav.obj) : error LNK2019: unresolved external symbol _D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv referenced in function _D3std6format__

Re: dlib 0.19.1 seems to be failing linking with ldc2

2020-07-31 Thread jeff thompson via Digitalmars-d-learn
Also this is on x86_x64 box and the 2019 MSVC toolchain

dlib 0.19.1 seems to be failing linking with ldc2

2020-07-31 Thread jeff thompson via Digitalmars-d-learn
Hello Im using dlib 0.19.1 with a project and compiling with ldc2 1.22 its failing with the error below. This works fine with the latest dmd version. My targetType is a static lib, only other dependencies are latest bindbc-glfw and bindbc-gl Performing "debug" build using ldc2.exe for x86_64

Re: dub build to generate different kinds of libs

2020-07-29 Thread jeff thompson via Digitalmars-d-learn
On Wednesday, 29 July 2020 at 13:26:45 UTC, Andre Pany wrote: On Tuesday, 28 July 2020 at 22:10:58 UTC, jeff thompson wrote: On Tuesday, 28 July 2020 at 22:08:14 UTC, Steven Schveighoffer wrote: [...] Thanks Steve!, ya i know i can call build twice but i was wondering if there was any config

Re: dub build to generate different kinds of libs

2020-07-28 Thread jeff thompson via Digitalmars-d-learn
On Tuesday, 28 July 2020 at 22:08:14 UTC, Steven Schveighoffer wrote: On 7/28/20 5:50 PM, jeff thompson wrote: Hello Im brand new to D (loving it btw!) and have decided to build a largish windows project in the language. First question, is there a dub.json setup to have a dub build to generat

Re: dub build to generate different kinds of libs

2020-07-28 Thread jeff thompson via Digitalmars-d-learn
On Tuesday, 28 July 2020 at 22:08:14 UTC, Steven Schveighoffer wrote: On 7/28/20 5:50 PM, jeff thompson wrote: Hello Im brand new to D (loving it btw!) and have decided to build a largish windows project in the language. First question, is there a dub.json setup to have a dub build to generat

dub build to generate different kinds of libs

2020-07-28 Thread jeff thompson via Digitalmars-d-learn
Hello Im brand new to D (loving it btw!) and have decided to build a largish windows project in the language. First question, is there a dub.json setup to have a dub build to generate multiple binaries in one call? Like a dll and a static lib. Seems like it would be easy maybe im missing some

Re: dub build to generate different kinds of libs

2020-07-28 Thread jeff thompson via Digitalmars-d-learn
I saw this https://github.com/dlang/dub/wiki/Cookbook#creating-a-library-package-that-also-comes-with-an-executable But it didnt result in creating both a dll or exe and a .lib

Re: "inline" conversion of array to immutable

2016-04-22 Thread Jeff Thompson via Digitalmars-d-learn
On Friday, 22 April 2016 at 11:16:59 UTC, ag0aep6g wrote: It's a nested function now. That means, it could reference local variables of main. Make func static and it works. You can also use a function literal: void main() { immutable int[] array = { int[] result = new int[10]; re

Re: "inline" conversion of array to immutable

2016-04-22 Thread Jeff Thompson via Digitalmars-d-learn
On Friday, 22 April 2016 at 09:40:14 UTC, FreeSlave wrote: On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote: Hello. The following code compiles OK where func creates a mutable array and main assigns it to an immutable variable: [...] Probably this is what you look for http://dl

"inline" conversion of array to immutable

2016-04-22 Thread Jeff Thompson via Digitalmars-d-learn
Hello. The following code compiles OK where func creates a mutable array and main assigns it to an immutable variable: int[] func(int x) pure { int[] result = new int[10]; result[0] = x; return result; } void main(string[] args) { immutable int[] array = func(1); } I assume this works

Re: immutable array in constructor

2016-03-19 Thread Jeff Thompson via Digitalmars-d-learn
On Thursday, 17 March 2016 at 11:27:01 UTC, Rene Zwanenburg wrote: On Thursday, 17 March 2016 at 10:11:43 UTC, Jeff Thompson wrote: This is a simplified example from a larger class I have where I need an immutable constructor. This is because I need to construct an object an pass it to other fu

Re: immutable array in constructor

2016-03-19 Thread Jeff Thompson via Digitalmars-d-learn
On Thursday, 17 March 2016 at 10:04:53 UTC, Anonymouse wrote: On Thursday, 17 March 2016 at 09:57:37 UTC, Jeff Thompson wrote: In the following code, I explicitly declare array as immutable. But it compiles with the error shown below in the comment. The array object is declared immutable, so ho

immutable array in constructor

2016-03-18 Thread Jeff Thompson via Digitalmars-d-learn
In the following code, I explicitly declare array as immutable. But it compiles with the error shown below in the comment. The array object is declared immutable, so how can the compiler say it is a mutable object? In summary, how to pass an immutable array to an immutable constructor? class