Importing D libraries

2011-07-26 Thread Dainius (GreatEmerald)
I must be missing something incredibly obvious here, but I can't find out what it is... I'm trying to build a very simple test program for LuaD, right now it simply imports the library. But it throws a linker error for some reason. Here's the program I'm trying to compile: import std.stdio;

Re: Importing D libraries

2011-07-26 Thread Andrew Wiley
On Tue, Jul 26, 2011 at 2:02 AM, Dainius (GreatEmerald) past...@gmail.comwrote: I must be missing something incredibly obvious here, but I can't find out what it is... I'm trying to build a very simple test program for LuaD, right now it simply imports the library. But it throws a linker

Re: Importing D libraries

2011-07-26 Thread Dainius (GreatEmerald)
Hmm, apparently it requires a strict compilation order. If I just add all .d files in no particular order, I get lots of linker errors, for example: LuaTest.o: In function `_D4luad4base9LuaObject9checkTypeFPT4luad1c3lua9lua_StateiiPxaZv':

Re: Importing D libraries

2011-07-26 Thread Nick Sabalausky
Andrew Wiley wiley.andre...@gmail.com wrote in message news:mailman.1914.1311673246.14074.digitalmars-d-le...@puremagic.com... On Tue, Jul 26, 2011 at 2:02 AM, Dainius (GreatEmerald) past...@gmail.comwrote: I must be missing something incredibly obvious here, but I can't find out what it

operator overloading compilation error

2011-07-26 Thread Diego Canuhé
Hi I'm trying to overload the + and - operators for a struct but I get this error test.d(47): Error: incompatible types for ((v1) - (v2)): 'Vecf!(1u)' and 'Vecf!(1u)' (the line corresponds to the last assert) doing something like this struct Vecf(uint n) { ... Vecf!n opBinary(string

Re: Importing D libraries

2011-07-26 Thread Dainius (GreatEmerald)
I updated the DMD and tried RDMD, but still no luck. Linker errors galore. You can see all of them here: http://pastebin.com/C6cRVGKt

Re: Importing D libraries

2011-07-26 Thread Pelle
On Tue, 26 Jul 2011 13:06:56 +0200, Dainius (GreatEmerald) past...@gmail.com wrote: I updated the DMD and tried RDMD, but still no luck. Linker errors galore. You can see all of them here: http://pastebin.com/C6cRVGKt You need to link the library as well, try adding -L-llua (I think) to the

Re: Importing D libraries

2011-07-26 Thread Dainius (GreatEmerald)
Ah, that did the trick, thanks!

Re: Importing D libraries

2011-07-26 Thread Diego Canuhé
I compiled a test for LuaD a few days ago without problems. I think you need to link to the lua library On Tue, Jul 26, 2011 at 8:06 AM, Dainius (GreatEmerald) past...@gmail.comwrote: I updated the DMD and tried RDMD, but still no luck. Linker errors galore. You can see all of them here:

Re: How do I call super or object.opAssign for classes?

2011-07-26 Thread Diego Canuhé
Hi, isn't that the way it's supposed to work? I mean void show(int a) { writeln(a); } void main() { show(null); } won't compile either. Shouldn't bar be some kind of pointer? btw, today I read opAssign can no longer be overloaded for class objects here:

Re: operator overloading compilation error

2011-07-26 Thread bearophile
Diego Canuhé: I'm trying to overload the + and - operators for a struct but I get this error test.d(47): Error: incompatible types for ((v1) - (v2)): 'Vecf!(1u)' and 'Vecf!(1u)' (the line corresponds to the last assert) It's a dmd bug, and I think it's already in Bugzilla. This is

Re: operator overloading compilation error

2011-07-26 Thread Diego Canuhé
thanks! On Tue, Jul 26, 2011 at 9:12 AM, bearophile bearophileh...@lycos.comwrote: Diego Canuhé: I'm trying to overload the + and - operators for a struct but I get this error test.d(47): Error: incompatible types for ((v1) - (v2)): 'Vecf!(1u)' and 'Vecf!(1u)' (the line

Re: How do I call super or object.opAssign for classes?

2011-07-26 Thread Steven Schveighoffer
On Tue, 26 Jul 2011 07:54:54 -0400, Diego Canuhé canuh...@gmail.com wrote: Hi, isn't that the way it's supposed to work? I mean void show(int a) { writeln(a); } void main() { show(null); } won't compile either. Shouldn't bar be some kind of pointer? null should be considered as the type

Re: Very strange linker error

2011-07-26 Thread Mafi
Am 23.07.2011 17:10, schrieb Mafi: I'm trying to rebuild my projects with new dmd and after fixing some minor issues in my code I get the following: Warning: As of Phobos 2.054, std.file.listDir has been scheduled for deprecation in August 2011. Please use std.file.dirEntries instead. OPTLINK

Error building dfl on dmd 2.054

2011-07-26 Thread simendsjo
I've just added default: assert(0) on the switches, but I got an error I don't know how to solve: tabcontrol.d(18): Error: class dfl.tabcontrol.TabPage use of dfl.control.Control.opEquals(Control ctrl) hidden by TabPage is deprecated Any ideas? The best would of course be if the maintainer

Re: Error building dfl on dmd 2.054

2011-07-26 Thread bearophile
simendsjo: I've just added default: assert(0) on the switches, but I got an error I don't know how to solve: See: http://d.puremagic.com/issues/show_bug.cgi?id=6373 Bye, bearophile

Re: error when std.range.Cycle of static array is a member

2011-07-26 Thread Steven Schveighoffer
On Mon, 25 Jul 2011 11:25:17 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: Please file a 'rejects-valid' bug. http://d.puremagic.com/issues/show_bug.cgi?id=6385

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
simendsjo Wrote: I've just added default: assert(0) on the switches, but I got an error I don't know how to solve: tabcontrol.d(18): Error: class dfl.tabcontrol.TabPage use of dfl.control.Control.opEquals(Control ctrl) hidden by TabPage is deprecated Any ideas? The best would of course

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
Jesse Phillips Wrote: I just made a pull request to fix this in the unofficial repo. But Bearophile's alias is probably the correct solution. Forgot to give you the quick link: https://github.com/Rayerd/dfl/pull/3

Re: Importing D libraries

2011-07-26 Thread Nick Sabalausky
Pelle pelle.mans...@gmail.com wrote in message news:op.vy74cwejzu79i9@pelle-d2608-a1... On Tue, 26 Jul 2011 13:06:56 +0200, Dainius (GreatEmerald) past...@gmail.com wrote: I updated the DMD and tried RDMD, but still no luck. Linker errors galore. You can see all of them here:

Re: Importing D libraries

2011-07-26 Thread Andrej Mitrovic
On 7/26/11, Nick Sabalausky a@a.a wrote: Pelle pelle.mans...@gmail.com wrote in message news:op.vy74cwejzu79i9@pelle-d2608-a1... On Tue, 26 Jul 2011 13:06:56 +0200, Dainius (GreatEmerald) past...@gmail.com wrote: I updated the DMD and tried RDMD, but still no luck. Linker errors galore. You

Re: Error building dfl on dmd 2.054

2011-07-26 Thread simendsjo
On 26.07.2011 20:49, Jesse Phillips wrote: Jesse Phillips Wrote: I just made a pull request to fix this in the unofficial repo. But Bearophile's alias is probably the correct solution. Forgot to give you the quick link: https://github.com/Rayerd/dfl/pull/3 !? Now I'm a bit lost. It says

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
On Tue, 26 Jul 2011 22:22:39 +0200, simendsjo wrote: On 26.07.2011 20:49, Jesse Phillips wrote: Jesse Phillips Wrote: I just made a pull request to fix this in the unofficial repo. But Bearophile's alias is probably the correct solution. Forgot to give you the quick link: