[Issue 12723] New: Support compiling C/C++ files in D projects
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 9 09:46:50 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12723
Issue ID: 12723
Summary: Support compiling C/C++ files in D projects
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: VisualD
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
It would be nice if VisualD projects could support compiling C/C++ code in
addition to D code when .c/.cpp files are added to the project, in just the
same way that C++ projects fall back to C mode when compiling .c files.
It is common that a .c file finds its way into D projects. Druntime has a .c
and a .asm file. phobos compiles zlib together with the rest of the D code.
The idea is not to support full blown C projects with all the bells and
whistles, but to make it possible to express such a project where there is just
a couple of C files along with the majority D code. It's very awkward to split
these up into multiple project files in Visual Studio.
I suggest:
Win64 - invoke MSC, and then supply the result .obj file to DMD as it builds
the D code.
Win32 - invoke DMC, same story.
GCC - GCC is always present alongside GDC, and most of the same build flags
are supported between compilers.
LDC - invoke clang?
I think as a goal, it should be possible to express druntime and phobos in a
visualdproj without any awkward mischief.
--
More information about the Digitalmars-d-bugs
mailing list