Re: Can't get D calling C to build.

2010-08-27 Thread Philippe Sigaud
On Fri, Aug 27, 2010 at 11:08, Bob Cowdery wrote: *** I'm running 10.05 but when I go to Syntax highlighting there is no 'D' in the dropdown. I have C/C++, Squirrel, Windows Resource, XML. To get some highlighting I just set the mask for C/C++ to include *.d. On the code completion plugin

Re: Can't get D calling C to build.

2010-08-27 Thread Andrej Mitrovic
CB doesn't officially have support for D (I don't see it in code completion either), afaik. But it does have syntax highlighting for it. I have about 30 or so different languages selectable in the highlighter, I think these came by default. Bob Cowdery Wrote: > On 26/08/2010 21:43, Philippe S

Re: Can't get D calling C to build.

2010-08-27 Thread Bob Cowdery
On 26/08/2010 21:43, Philippe Sigaud wrote: > > > On Tue, Aug 24, 2010 at 15:24, Bob Cowdery > wrote: > > I might be on my way :-) . > > Good :) I just skimmed through the thread, so I don't know if you're > still using Code::Blocks. > I'm using it, and it hig

Re: Can't get D calling C to build.

2010-08-27 Thread torhu
On 23.08.2010 23:24, Bob Cowdery wrote: Addendum: The plot thickens. If I build a dll with my VC++ Express 2010 then I can convert the import library and it actually works from D. However if I build with MinGW GCC it doesn't even recognise the library even though it is COFF format. My preferred r

Re: Can't get D calling C to build.

2010-08-26 Thread Andrej Mitrovic
CB uses the Scintilla editing component, which is the one used by Scite (which I'm using atm). Scite was missing quite a bit of keywords, so I've added some of them. I just did a comparison, and it seems they're both missing a bunch of keywords. A fun thing to do is open CB and Scite side-by-si

Re: Can't get D calling C to build.

2010-08-26 Thread Philippe Sigaud
On Tue, Aug 24, 2010 at 15:24, Bob Cowdery wrote: > I might be on my way :-) . > > Good :) I just skimmed through the thread, so I don't know if you're still using Code::Blocks. I'm using it, and it highlights D code with no problem. For 10.05, it's in Settings > Editor > Syntax Highlighting > sy

Re: Can't get D calling C to build.

2010-08-24 Thread Bob Cowdery
On 23/08/2010 23:04, bearophile wrote: > Andrej Mitrovic: > >> I haven't read the specifics of your problem yet, but have you tried using >> the newer TDM port of MinGW? The MinGW binaries are still using an older >> port of GCC, but the TDM version is much newer, so it might be worth trying >

Re: Can't get D calling C to build.

2010-08-23 Thread bearophile
> I like this, and I love the way you install it, this is the way a compiler > has to be installed: > http://nuwen.net/mingw.html Uhm... The last version (6.6 that is gcc 4.5.1) seems to produce very large binaries, and the precedent version seems not available. Not good for you. Bye and sorry,

Re: Can't get D calling C to build.

2010-08-23 Thread Andrej Mitrovic
I haven't read the specifics of your problem yet, but have you tried using the newer TDM port of MinGW? The MinGW binaries are still using an older port of GCC, but the TDM version is much newer, so it might be worth trying it out. Get it from here: http://tdm-gcc.tdragon.net/ Hope that helps

Re: Can't get D calling C to build.

2010-08-23 Thread Bob Cowdery
On 23/08/2010 20:24, Bob Cowdery wrote: > On 22/08/2010 22:16, Bob Cowdery wrote: >> On 22/08/2010 20:57, bearophile wrote: >>> Bob Cowdery: Well, the link still works but the download is 0 bytes so I guess its not available. Thanks for the thought. >>> That links works for me :-) >>>

Re: Can't get D calling C to build.

2010-08-23 Thread Bob Cowdery
On 22/08/2010 22:16, Bob Cowdery wrote: > On 22/08/2010 20:57, bearophile wrote: >> Bob Cowdery: >>> Well, the link still works but the download is 0 bytes so I guess its >>> not available. Thanks for the thought. >> That links works for me :-) >> Be happy, bye, >> bearophile > Works if I paste i

Re: Can't get D calling C to build.

2010-08-23 Thread Kagamin
Bob Cowdery Wrote: > Thanks, that's an honest opinion. The first project I have in mind is a > personal one but it's quite large. My hope would be to move a lot of the > C code into D eventually. I don't think I would risk it on a commercial > project until the toolchain is sorted and its a bit mo

Re: Can't get D calling C to build.

2010-08-22 Thread Bob Cowdery
On 22/08/2010 20:57, bearophile wrote: > Bob Cowdery: >> Well, the link still works but the download is 0 bytes so I guess its >> not available. Thanks for the thought. > That links works for me :-) > Be happy, bye, > bearophile Works if I paste it but not straight from the email,odd.

Re: Can't get D calling C to build.

2010-08-22 Thread bearophile
Bob Cowdery: > Well, the link still works but the download is 0 bytes so I guess its > not available. Thanks for the thought. That links works for me :-) Be happy, bye, bearophile

Re: Can't get D calling C to build.

2010-08-22 Thread Bob Cowdery
On 21/08/2010 22:41, Johannes Pfau wrote: > On 21.08.2010 23:07, Bob Cowdery wrote: >> For me at least I'm wondering if it stacks up. Linux support seems >> secondary (correct me if I'm wrong). The only painless way to use C >> libraries is as dll's and even then the import library must be convert

Re: Can't get D calling C to build.

2010-08-22 Thread Bob Cowdery
On 22/08/2010 00:54, div0 wrote: > On 21/08/2010 22:07, Bob Cowdery wrote: >> On 20/08/2010 18:44, div0 wrote: >>> On 20/08/2010 09:17, Bob Cowdery wrote: I'm still concerned it's a bit too soon as a lot of things seem to be either Windows or Linux (cmake says its only tested for

Re: Can't get D calling C to build.

2010-08-21 Thread div0
On 21/08/2010 22:07, Bob Cowdery wrote: On 20/08/2010 18:44, div0 wrote: On 20/08/2010 09:17, Bob Cowdery wrote: I'm still concerned it's a bit too soon as a lot of things seem to be either Windows or Linux (cmake says its only tested for *nix) but not both and there is very little guidance

Re: Can't get D calling C to build.

2010-08-21 Thread Johannes Pfau
On 21.08.2010 23:07, Bob Cowdery wrote: > > For me at least I'm wondering if it stacks up. Linux support seems > secondary (correct me if I'm wrong). The only painless way to use C > libraries is as dll's and even then the import library must be converted > for which the tool in not free. I had t

Re: Can't get D calling C to build.

2010-08-21 Thread bearophile
Bob Cowdery: > Why does a modern language use an old object format I wonder. This problem will need to be addressed (among others). > The language itself is nice but the > hassle factor for mixed language multi-platform seems quite high. I hope > I'm wrong on both counts. Despite being in the w

Re: Can't get D calling C to build.

2010-08-21 Thread Bob Cowdery
On 20/08/2010 18:44, div0 wrote: > On 20/08/2010 09:17, Bob Cowdery wrote: >> >> I'm still concerned it's a bit too soon as a lot of things seem to be >> either Windows or Linux (cmake says its only tested for *nix) but not >> both and there is very little guidance on building. I really want to ge

Re: Can't get D calling C to build.

2010-08-20 Thread div0
On 20/08/2010 09:17, Bob Cowdery wrote: I'm still concerned it's a bit too soon as a lot of things seem to be either Windows or Linux (cmake says its only tested for *nix) but not both and there is very little guidance on building. I really want to get this working on Windows first. As D makes s

Re: Can't get D calling C to build.

2010-08-20 Thread Bob Cowdery
A bit more playing and I see that it's assumed that C code is compiled with dmc and then the D code can be compiled with dmd which will also link in the obj left by dmc. It wasn't clear at all that to make things work easily one needs to use both the C and D Digital Mars compilers. Code::Blocks

Re: Can't get D calling C to build.

2010-08-20 Thread Bob Cowdery
On 20/08/2010 06:51, Kagamin wrote: > Bob Cowdery Wrote: > >> Now I've tried this with just D code and it writes the output and runs >> so I know something works. Does anyone know where to look, is it >> Code::Blocks, compiler, stupidity (probably). > On windows dmd uses ancient OMF object format,

Re: Can't get D calling C to build.

2010-08-20 Thread Bob Cowdery
Thanks for the replies. I've bounced off D a few times because it didn't seem ready to risk a whole development. I should have mentioned I'm trying this on Windows 7. I did suspect object formats were incompatible but as you say would have expected a decent error message. I also tried from the com

Re: Can't get D calling C to build.

2010-08-19 Thread Kagamin
Bob Cowdery Wrote: > Now I've tried this with just D code and it writes the output and runs > so I know something works. Does anyone know where to look, is it > Code::Blocks, compiler, stupidity (probably). On windows dmd uses ancient OMF object format, but gcc compiles to COFF.

Re: Can't get D calling C to build.

2010-08-19 Thread SK
On Thu, Aug 19, 2010 at 2:46 PM, Jonathan M Davis wrote: > My first question would be whether you used the same linker for both D and C. > On > Linux, they should both be using gcc. On Windows, they should both be using > dmc. > Still, I would have expected a linking error to be a bit more expl

Re: Can't get D calling C to build.

2010-08-19 Thread Jonathan M Davis
On Thursday, August 19, 2010 06:52:33 Bob Cowdery wrote: > Hi > > Just trying to get started and need a little advice. First up was > selecting an IDE, tried a few and settled on Code::Blocks. I need > Windows and Linux and also C and D supported in the same IDE. The > support does not seem to be