Thread overview | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 12, 2011 htod | ||||
---|---|---|---|---|
| ||||
I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction. C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h' C:\dir>dir c:\d\dm\include\stdlib.h Directory of c:\d\dm\include 07/28/2011 09:10 PM 12,553 stdlib.h 1 File(s) 12,553 bytes 0 Dir(s) 526,794,256,384 bytes free Putting stdlib.h in same dir with header I'm converting gives no joy either. |
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason King | On Friday, August 12, 2011 04:07:47 Jason King wrote:
> I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction.
>
> C:\dir>htod -I c:\d\dm\include ocilib.h
> Fatal error: unable to open input file 'stdlib.h'
>
> C:\dir>dir c:\d\dm\include\stdlib.h
> Directory of c:\d\dm\include
>
> 07/28/2011 09:10 PM 12,553 stdlib.h
> 1 File(s) 12,553 bytes
> 0 Dir(s) 526,794,256,384 bytes free
>
> Putting stdlib.h in same dir with header I'm converting gives no joy either.
There's nothing wrong with using htod if you can get it to work. However, the question is whether you can get it to work for what you're doing. And as I understand it, you're gonig to have to go over what it did after it did it, because it doesn't do a perfect job. But if you can get it to work, it's definitely desirable, since it'll save you a fair bit of work.
But unfortunately, htod Windows-only, and I haven't been converting much C code lately, I don't know it well enough to really help you get it working. It _is_ worth using though.
- Jonathan M Davis
|
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 12.08.2011 11:24, Jonathan M Davis wrote:
> On Friday, August 12, 2011 04:07:47 Jason King wrote:
>> I'm attempting to convert a c header to d using htod. If this is not
>> current best practice please point me in another direction.
>>
>> C:\dir>htod -I c:\d\dm\include ocilib.h
>> Fatal error: unable to open input file 'stdlib.h'
>>
>> C:\dir>dir c:\d\dm\include\stdlib.h
>> Directory of c:\d\dm\include
>>
>> 07/28/2011 09:10 PM 12,553 stdlib.h
>> 1 File(s) 12,553 bytes
>> 0 Dir(s) 526,794,256,384 bytes free
>>
>> Putting stdlib.h in same dir with header I'm converting gives no joy either.
>
> There's nothing wrong with using htod if you can get it to work. However, the
> question is whether you can get it to work for what you're doing. And as I
> understand it, you're gonig to have to go over what it did after it did it,
> because it doesn't do a perfect job. But if you can get it to work, it's
> definitely desirable, since it'll save you a fair bit of work.
>
> But unfortunately, htod Windows-only, and I haven't been converting much C
> code lately, I don't know it well enough to really help you get it working. It
> _is_ worth using though.
>
> - Jonathan M Davis
htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly?
Is the source public? Would it be better to use gcc or clang instead?
htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.
|
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | My expectation is not that I can htod that 17k line header and magically have a d module. A lot of the header is #define'd constants and typedefs and I _do_ expect htod to remove some of the scutwork involved there. At this point I'd just be happy if it ran w/o error. >> >> There's nothing wrong with using htod if you can get it to work. >> However, the >> question is whether you can get it to work for what you're doing. And > > htod is a fork of dmc or something, right? How difficult is it to update > the program to make it more user friendly? > Is the source public? Would it be better to use gcc or clang instead? > htod is a great thought, but I haven't either gotten it to work for > anything but the simplest cases. |
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | On 2011-08-12 11:36, simendsjo wrote: > htod is a fork of dmc or something, right? How difficult is it to update > the program to make it more user friendly? > Is the source public? Would it be better to use gcc or clang instead? > htod is a great thought, but I haven't either gotten it to work for > anything but the simplest cases. I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project. -- /Jacob Carlborg |
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob@me.com>:
> On 2011-08-12 11:36, simendsjo wrote:
>> htod is a fork of dmc or something, right? How difficult is it to update
>> the program to make it more user friendly?
>> Is the source public? Would it be better to use gcc or clang instead?
>> htod is a great thought, but I haven't either gotten it to work for
>> anything but the simplest cases.
>
> I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.
I also played with the idea. Clang's Rewrite facilities should be perfect for that.
|
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | > htod is a fork of dmc or something, right? Yep. > How difficult is it to update the program to make it more user friendly? Only Walter can. > Is the source public? No. > Would it be better to use gcc or clang instead? Hell yeah. Clang's predestined for that. |
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason King | On 8/12/11, Jason King <jhking@airmail.net> wrote:
> I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction.
>
> C:\dir>htod -I c:\d\dm\include ocilib.h
> Fatal error: unable to open input file 'stdlib.h'
You have an extra space there. Use:
htod -IC:\d\dm\include ocilib.h
That will work.
|
August 12, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | On 2011-08-12 13:48, Trass3r wrote: > Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob@me.com>: > >> On 2011-08-12 11:36, simendsjo wrote: >>> htod is a fork of dmc or something, right? How difficult is it to update >>> the program to make it more user friendly? >>> Is the source public? Would it be better to use gcc or clang instead? >>> htod is a great thought, but I haven't either gotten it to work for >>> anything but the simplest cases. >> >> I'm working on a tool to convert C header files to D modules based on >> clang. But currently it's not a prioritized project. > > I also played with the idea. Clang's Rewrite facilities should be > perfect for that. Yeah, I'm using Rewrite, if I recall correctly. -- /Jacob Carlborg |
August 13, 2011 Re: htod | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg Attachments:
| Are you really working on a better htod?
will it try to convert ifdefs in version()?
2011/8/12 Jacob Carlborg <doob@me.com>
> On 2011-08-12 13:48, Trass3r wrote:
>
>> Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob@me.com>:
>>
>> On 2011-08-12 11:36, simendsjo wrote:
>>>
>>>> htod is a fork of dmc or something, right? How difficult is it to update
>>>> the program to make it more user friendly?
>>>> Is the source public? Would it be better to use gcc or clang instead?
>>>> htod is a great thought, but I haven't either gotten it to work for
>>>> anything but the simplest cases.
>>>>
>>>
>>> I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.
>>>
>>
>> I also played with the idea. Clang's Rewrite facilities should be perfect for that.
>>
>
> Yeah, I'm using Rewrite, if I recall correctly.
>
> --
> /Jacob Carlborg
>
|
Copyright © 1999-2021 by the D Language Foundation