August 19, 2010
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 finished in Code::Blocks though, does it really not have syntax highlighting for D or did I miss something.
> 
> Anyhow it works well enough for now. First task was to build a test of D calling C. Made the simplest possible C static library, one method returns a string. Made the simplest possible D app which calls the C method and prints the result. I built the C part and then referenced it as a library in the D build. The D build goes with no errors and says it has written the output file... but it doesn't, there is  no output file.
> 
> It says:
> Linking console executable: bin\Release\DTest.exe
> 
> 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).
> 
> Regards
> Bob

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 explosive than nothing.

- Jonathan M Davis
August 19, 2010
On Thu, Aug 19, 2010 at 2:46 PM, Jonathan M Davis <jmdavisprog@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 be a bit more explosive than nothing.
>
> - Jonathan M Davis

My experience has been the opposite - dmd is needed to link programs
that mix C and D.  While you may not want to jump into CMake for
builds, the regression tests for cmaked include building and link D+C
objects and D + C libraries.
http://code.google.com/p/cmaked2/wiki/GettingStarted
FYI, cmaked is still work in progress, so you might run into bumps.
-steve