Re: State of interfacing with c++

2016-03-20 Thread Jakob Ovrum via Digitalmars-d
On Friday, 18 March 2016 at 13:45:18 UTC, Jonas Drewsen wrote: Any pointers to reasonably up-to-date info about interfacing with c++ is much appreciated as well. The language documentation is up to date except for the section on exceptions: http://dlang.org/spec/cpp_interface.html I'd updat

Re: State of interfacing with c++

2016-03-20 Thread Walter Bright via Digitalmars-d
On 3/18/2016 6:45 AM, Jonas Drewsen wrote: [...] dmd itself is a D main program that calls a lot of C++ code (the optimizer and back end) and so interfacing to C++ works on every platform dmd runs on.

Re: State of interfacing with c++

2016-03-19 Thread Johan Engelen via Digitalmars-d
On Friday, 18 March 2016 at 13:45:18 UTC, Jonas Drewsen wrote: For a hack week at work I am thinking about creating a module in D that can be used with our existing application which is written in C++. Can anyone shed some light on the current status of interfacing with C++? In particular:

Re: State of interfacing with c++

2016-03-19 Thread jmh530 via Digitalmars-d
On Friday, 18 March 2016 at 14:26:31 UTC, ZombineDev wrote: The important thing to remember is that the Druntime must be initialized (see http://wiki.dlang.org/Runtime_internals and http://dlang.org/phobos/core_runtime.html#.rt_init for more info), before you call D functions that use the garba

Re: State of interfacing with c++

2016-03-19 Thread ZombineDev via Digitalmars-d
On Friday, 18 March 2016 at 15:29:55 UTC, jmh530 wrote: On Friday, 18 March 2016 at 14:26:31 UTC, ZombineDev wrote: The important thing to remember is that the Druntime must be initialized (see http://wiki.dlang.org/Runtime_internals and http://dlang.org/phobos/core_runtime.html#.rt_init for mo

Re: State of interfacing with c++

2016-03-19 Thread Johan Engelen via Digitalmars-d
On Saturday, 19 March 2016 at 10:52:35 UTC, Johan Engelen wrote: On Saturday, 19 March 2016 at 08:10:41 UTC, Johan Engelen wrote: On Friday, 18 March 2016 at 20:47:41 UTC, Walter Bright wrote: On 3/18/2016 6:59 AM, Johan Engelen wrote: It'd be nice to be able to call `dmd -ldflags` whose output

Re: State of interfacing with c++

2016-03-19 Thread Jonas Drewsen via Digitalmars-d
On Friday, 18 March 2016 at 20:50:59 UTC, Walter Bright wrote: On 3/18/2016 6:45 AM, Jonas Drewsen wrote: [...] dmd itself is a D main program that calls a lot of C++ code (the optimizer and back end) and so interfacing to C++ works on every platform dmd runs on. My concern was mostly if I

Re: State of interfacing with c++

2016-03-19 Thread Walter Bright via Digitalmars-d
On 3/18/2016 6:59 AM, Johan Engelen wrote: It'd be nice to be able to call `dmd -ldflags` whose output would be the standard linker flags. dmd -v file.d will tell you what command is sent to the linker.

State of interfacing with c++

2016-03-19 Thread Jonas Drewsen via Digitalmars-d
For a hack week at work I am thinking about creating a module in D that can be used with our existing application which is written in C++. Can anyone shed some light on the current status of interfacing with C++? In particular: 1, Can I build my C++ program using visual c++ and then link a D

Re: State of interfacing with c++

2016-03-19 Thread Johan Engelen via Digitalmars-d
On Saturday, 19 March 2016 at 08:10:41 UTC, Johan Engelen wrote: On Friday, 18 March 2016 at 20:47:41 UTC, Walter Bright wrote: On 3/18/2016 6:59 AM, Johan Engelen wrote: It'd be nice to be able to call `dmd -ldflags` whose output would be the standard linker flags. dmd -v file.d will tel

Re: State of interfacing with c++

2016-03-19 Thread Johan Engelen via Digitalmars-d
On Friday, 18 March 2016 at 20:47:41 UTC, Walter Bright wrote: On 3/18/2016 6:59 AM, Johan Engelen wrote: It'd be nice to be able to call `dmd -ldflags` whose output would be the standard linker flags. dmd -v file.d will tell you what command is sent to the linker. That linker command do

Re: State of interfacing with c++

2016-03-18 Thread jmh530 via Digitalmars-d
On Friday, 18 March 2016 at 19:21:08 UTC, ZombineDev wrote: I'm sorry, what I said about rt_init() [1] is wrong. It does a lot of stuff and it's not just enabling the garbage collector. This means you have to be more careful if you decide to not call it. Here's what it does: If it is useful

Re: State of interfacing with c++

2016-03-18 Thread ZombineDev via Digitalmars-d
On Friday, 18 March 2016 at 13:45:18 UTC, Jonas Drewsen wrote: For a hack week at work I am thinking about creating a module in D that can be used with our existing application which is written in C++. Can anyone shed some light on the current status of interfacing with C++? In particular:

Re: State of interfacing with c++

2016-03-18 Thread tsbockman via Digitalmars-d
On Friday, 18 March 2016 at 14:11:46 UTC, Jakob Ovrum wrote: I'd update the section on exceptions but I'm really tired of fighting the dlang.org makefile. http://forum.dlang.org/post/aupwqmkicdjzwxdkk...@forum.dlang.org If you'll write an update for the C++ exceptions section as plain text,