Thread overview
[Issue 12723] Support compiling C/C++ files in D projects
May 13, 2014
Rainer Schuetze
May 17, 2014
Manu
May 17, 2014
Rainer Schuetze
Nov 07, 2014
Rainer Schuetze
Jan 01, 2015
Rainer Schuetze
May 13, 2014
https://issues.dlang.org/show_bug.cgi?id=12723

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de

--- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> ---
You can do this with the custom build tool, including adding dependencies and output filename to be added to the link. The commnd line can be set once for all configurations or differently for each configuration.

I'm not sure explicite support for C/C++ files is worth the effort. Without implementing controls for all the compiler options, you'll have to specify most of the command line yourself anyway.

--
May 17, 2014
https://issues.dlang.org/show_bug.cgi?id=12723

--- Comment #2 from Manu <turkeyman@gmail.com> ---
Custom build tool is really awkward when build dependencies and linkage are all required steps.

I'm not saying it's an urgent feature, but I feel it would be pretty valuable, since I don't think it's uncommon by any means, and would probably allow a lot of people a lot less friction to get their project running.

Most Visual Studio users have no idea how to execute a compiler via the command line (and consequently hook it all up via a custom build tool). I mean, that kinda the point of VS integration.

I think it'd only need a couple of the most important options, and for GDC/LDC builds, a lot of the options are shared (optimisation, debuginfo, linker, etc).


On a separate note, I was looking at the builtin MSBuild scripts for C/C++, and
it occurred to me that it might be possible to hack D support into the official
vcxproj stuff. Did you ever look into that?
I expect that approach would have no way to hook special code for autocomplete
and stuff though right? (I have no idea about the VS extensibility API)

--
May 17, 2014
https://issues.dlang.org/show_bug.cgi?id=12723

--- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> ---
I just tried how it works with setting up projects for druntime and phobos, and
adding "dmc -c -o$(IntDir)\$(InputName).obj $(InputPath)" for C files (and
specifying the output path works for Win32 builds. You'll run into problems
with "out of memory" when building unittests (enable single file compilation),
and too much debug info, though, but the latter is an issue with OMF tool
chain.

Trying to get some (android-sdk) VS integration to work which uses MSBuild, I noticed, these work by switching the "Platform Toolset". This seems like an "switch everything" approach, but the Intel compiler integration seems to change/add just a few entries of the project settings. It might be possible to setup some rules for dmc, or to integrate dmd, though that would exclude VS2008 and earlier from the list of supported versions. I'm not sure stuff like dependency handling will work smoothly.

Language service (including intellisense) is only slightly coupled with project
managements (mostly reading compile options). That would remain the same.

--
November 07, 2014
https://issues.dlang.org/show_bug.cgi?id=12723

--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> ---
I added basic C/C++ support in https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.40-beta2

--
January 01, 2015
https://issues.dlang.org/show_bug.cgi?id=12723

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Rainer Schuetze <r.sagitario@gmx.de> ---
released in 0.3.40.

--