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 b...@bobcowdery.plus.com mailto:b...@bobcowdery.plus.com 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

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

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 b...@bobcowdery.plus.com 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

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 b...@bobcowdery.plus.com 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

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 it out.

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 more

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 it but not

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 :-) Be happy, bye,

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

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-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 *nix) but not

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 converted

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 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-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 get this

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

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-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

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, but gcc

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 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

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 jmdavisp...@gmail.com 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

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.