May 31, 2017 Re: A Few thoughts on C, C++, and D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Wednesday, 31 May 2017 at 06:52:00 UTC, Jacob Carlborg wrote:
> But trying to compile the code in the "body" for Windows, on any other platform will fail because windows.h is not available.
But you don't have to do that if it is built into the compiler?
|
June 01, 2017 Re: A Few thoughts on C, C++, and D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On 2017-05-31 17:50, Ola Fosheim Grøstad wrote: > But you don't have to do that if it is built into the compiler? Ah, you mean like that. No, that should be necessary if the bindings are always generated on the fly. My answer was assuming how DStep currently is working. -- /Jacob Carlborg |
June 01, 2017 Re: A Few thoughts on C, C++, and D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 1 June 2017 at 06:43:44 UTC, Jacob Carlborg wrote:
> On 2017-05-31 17:50, Ola Fosheim Grøstad wrote:
>
>> But you don't have to do that if it is built into the compiler?
>
> Ah, you mean like that. No, that should be necessary if the bindings are always generated on the fly. My answer was assuming how DStep currently is working.
*nods* I think your idea of integrating with the compiler is a sound idea.
Even though a stand-alone tool is just as good in theory I think most developers want as hassle free builds as possible. If one can just point to the OS include directory and import directly that would be very neat.
|
June 01, 2017 Re: A Few thoughts on C, C++, and D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On 2017-06-01 10:25, Ola Fosheim Grøstad wrote: > Even though a stand-alone tool is just as good in theory I think most > developers want as hassle free builds as possible. If one can just point > to the OS include directory and import directly that would be very neat. Currently DStep will just ignore everything in the body of a preprocessor if statement where the condition is false, just like the regular compiler. For example, running DStep on a header file with the following content: #ifdef _WIN32 char foo(); #else int foo(); #endif Will produce on non-Windows platforms: extern (C): int foo (); So DStep works, just that will generate platform specific bindings. -- /Jacob Carlborg |
June 04, 2017 Re: A Few thoughts on C, C++, and D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 1 June 2017 at 12:04:40 UTC, Jacob Carlborg wrote:
> So DStep works, just that will generate platform specific bindings.
That is good enough if it is integrated with the compiler then.
|
Copyright © 1999-2021 by the D Language Foundation