Dlangui can't build x64 example1.exe , because the size_t is ulong on winx64

2014-05-03 Thread FrankLike via Digitalmars-d-learn
Hi,everyone, I build the dlangui on win7 x64,use the debug win32,it can get the example1.exe, but use the debug x64,not get the exe file,the error is Error: function pointer FreeImage_OpenMemory (ubyte* data = null, uint size_in_bytes = 0u) is not callable using argument types (ubyte*,

Re: Dlangui can't build x64 example1.exe , because the size_t is ulong on winx64

2014-05-03 Thread Rikki Cattermole via Digitalmars-d-learn
On Saturday, 3 May 2014 at 08:59:40 UTC, FrankLike wrote: Hi,everyone, I build the dlangui on win7 x64,use the debug win32,it can get the example1.exe, but use the debug x64,not get the exe file,the error is Error: function pointer FreeImage_OpenMemory (ubyte* data = null, uint

Re: Math-Parser

2014-05-03 Thread Rikki Cattermole via Digitalmars-d-learn
On Friday, 2 May 2014 at 22:34:48 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: Hi there, I currently try to write a simple math-parser in D. However.. something isn't working and I just can't figure out what's the problem. (I'm relative new to D, and this is my first test to write a

Re: Math-Parser

2014-05-03 Thread Timon Gehr via Digitalmars-d-learn
On 05/03/2014 12:34 AM, Tim Holzschuh via Digitalmars-d-learn wrote: Most probably this isn't a wrong use of something D-specific Some of the problems are: @property Lexer lexer() pure { return _lexer; } If you change the result of a call to 'lexer' this will not change '_lexer'. Mark the

Re: Postblit not invokable with MyStruct(MyStruct()); ?

2014-05-03 Thread Artur Skawina via Digitalmars-d-learn
On 05/03/14 01:05, Mark Isaacson via Digitalmars-d-learn wrote: 2) I ran into this issue while attempting to leverage the postblit for code-reuse. In particular, I have a setup that is similar to: struct A { this(B b) { /* Stuff */ } } struct B { } void foo(T)(T param) { auto a

ncurses linking(?) problem on Mac OS X

2014-05-03 Thread Joakim via Digitalmars-d-learn
Hi, I am very new to D, I just started with it a week ago or so, and I haven't really been using compiled languages before (except for Java), so I'm pretty confused with the whole thing in general. ;) I try to use the ncurses library in my project using: dependencies : { ncurses :

Re: Error 42: Symbol Undefined for asserts

2014-05-03 Thread FrankLike via Digitalmars-d-learn
The problem I am running in to now is that Xamarin Studio now launches Test.pdb.exe which doesn't seem to do anything at all. Use visual d,it's simple for using pdb.exe

Re: ncurses linking(?) problem on Mac OS X

2014-05-03 Thread Mike Parker via Digitalmars-d-learn
On 5/3/2014 9:36 PM, Joakim wrote: Terminated, exit code: 2 I have no idea where to go from here to be honest. It's probably something easily fixed for someone even a tiny bit more experienced. I would love some help if anyone feels up to it. Have you actually installed

Re: Error 42: Symbol Undefined for asserts

2014-05-03 Thread Andre Steenveld via Digitalmars-d-learn
On Saturday, 3 May 2014 at 13:18:13 UTC, FrankLike wrote: The problem I am running in to now is that Xamarin Studio now launches Test.pdb.exe which doesn't seem to do anything at all. Use visual d,it's simple for using pdb.exe Which isn't really an option, Visual D is for Visual Studio

Re: ncurses linking(?) problem on Mac OS X

2014-05-03 Thread Joakim via Digitalmars-d-learn
Have you actually installed ncurses on your system? https://gist.github.com/cnruby/960344 I will try this, but I did a search/info with homebrew and it said it was not recommended because OS X already has ncurses installed by default. Something about conflicts that could possibly occur. I

Re: ncurses linking(?) problem on Mac OS X

2014-05-03 Thread Joakim via Digitalmars-d-learn
It worked perfecly. I knew I had missed something stupid. :) What confused me was the homebrew warning. Thank you for helping a newbie out. :)

Re: *** GMX Spamverdacht *** Re: Math-Parser

2014-05-03 Thread Tim Holzschuh via Digitalmars-d-learn
Am 03.05.2014 11:17, schrieb Rikki Cattermole via Digitalmars-d-learn: General suggestions: Don't commit the build ext. files along with source code and in this case they aren't needed. Mono-D can load dub.json straight. As well as the obj/bin directories. Yeah you're right, thank you. (And

Re: Math-Parser

2014-05-03 Thread Tim Holzschuh via Digitalmars-d-learn
Am 03.05.2014 13:29, schrieb Timon Gehr via Digitalmars-d-learn: @property Lexer lexer() pure { return _lexer; } If you change the result of a call to 'lexer' this will not change '_lexer'. Mark the property 'ref' or get rid of it How did I forget about Lexer being a struct is a value

Re: Math-Parser

2014-05-03 Thread Timon Gehr via Digitalmars-d-learn
On 05/03/2014 08:20 PM, Tim Holzschuh via Digitalmars-d-learn wrote: Let me know if you also want hints on how to get the logic right. Would be very nice! While 2*2 works, 2+2 throws an Error because the number-method gets an END-Token instead of a Number-Token (although I'm not sure why).

Re: Postblit not invokable with MyStruct(MyStruct()); ?

2014-05-03 Thread Mark Isaacson via Digitalmars-d-learn
What actually fails is the initialization of 'a'. Add another this(A a) { /* Stuff */ } constructor to the 'A' struct, and it will work. And, yes, the missing cpctors are a language problem. artur Thanks. Yeah, I figured I could do that, I was just hoping that I could leverage the

Error

2014-05-03 Thread Martin Bossard via Digitalmars-d-learn
I tried the following: dub install derelict but i only received the following error The 'install' Command was renamed to 'fetch'. Please update your scripts. Getting a release version failed: No package derelict was found matching the dependency =0.0.0 Retry with ~master... Fetching derelict

map!(char)(string) problem

2014-05-03 Thread David Held via Digitalmars-d-learn
import std.algorithm; int toInt(char c) { return 1; } void main() { map!(a = toInt(a))(hello); } Can someone please explain why I get this: Bug.d(10): Error: function Bug.toInt (char c) is not callable using argument types (dchar)

Re: map!(char)(string) problem

2014-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Sat, 03 May 2014 14:47:56 -0700 David Held via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: import std.algorithm; int toInt(char c) { return 1; } void main() { map!(a = toInt(a))(hello); } Can someone please explain why I get this: Bug.d(10): Error:

Conversion and Assignment on EnumUnion and EnumChain

2014-05-03 Thread Nordlöw
I've put up a module https://github.com/nordlow/justd/blob/master/enums.d that provides two type constructors - EnumChain - EnumUnion that can be used to combine names or names-and-values from one or more enums. I would now like to define rules for assignments and implicit conversions