BCD and OpenSSL

Bill Baxter dnewsgroup at billbaxter.com
Mon Jun 4 04:04:38 PDT 2007


Regan Heath wrote:
> Bill Baxter Wrote:
>> Gregor Richards wrote:
>>> Regan Heath wrote:
>>>> Hi all,
>>>>
>>>> I decided to have another crack at BCD and the openssl headers.  I 
>>>> found a windows bcdgen binary package, mentioned in the dsource 
>>>> forums, but am having a little trouble using it.
>>>>
>>>> So far I have a copy of the openssl headers in a directory:
>>>>
>>>> G:\Src\openssl\h\openssl
>>>>
>>>> and plan to port them to D files in:
>>>>
>>>> G:\Src\openssl\d\
>>>>
>>>> so, I fire up bcdgen like so:
>>>>
>>>> G:\Src\openssl\h>bcdgen openssl\ssl.h openssl -b -C
>>>> openssl/ssl.h:173:27: openssl/e_os2.h: No such file or directory
>>>> openssl/ssl.h:176:26: openssl/comp.h: No such file or directory
>>>> openssl/ssl.h:179:25: openssl/bio.h: No such file or directory
>>>> openssl/ssl.h:183:26: openssl/x509.h: No such file or directory
>>>> openssl/ssl.h:185:28: openssl/crypto.h: No such file or directory
>>>> openssl/ssl.h:186:27: openssl/lhash.h: No such file or directory
>>>> openssl/ssl.h:187:28: openssl/buffer.h: No such file or directory
>>>> openssl/ssl.h:189:25: openssl/pem.h: No such file or directory
>>>> openssl/ssl.h:191:26: openssl/kssl.h: No such file or directory
>>>> openssl/ssl.h:192:31: openssl/safestack.h: No such file or directory
>>>> openssl/ssl.h:193:30: openssl/symhacks.h: No such file or directory
>>>> openssl/ssl.h:982:26: openssl/ssl2.h: No such file or directory
>>>> openssl/ssl.h:983:26: openssl/ssl3.h: No such file or directory
>>>> openssl/ssl.h:984:71: openssl/tls1.h: No such file or directory
>>>> openssl/ssl.h:985:46: openssl/dtls1.h: No such file or directory
>>>> openssl/ssl.h:986:27: openssl/ssl23.h: No such file or directory
>>>>
>>>> I tried various permutations of the -I option but I dont think it 
>>>> applies here as I am converting C headers, not C++. 
>>>> Anyone have a suggestion?  bcdgen seems to need an option for 
>>>> specifying import paths or something.
>>>>
>>>> Hopefully I am not being too dense, any help is appreciated.
>>>>
>>>> Regan Heath
>>> (WTF? People use BCD?)
>>>
>>> You need to put the include path in CFLAGS for C, or CXXFLAGS for C++. 
>>> That is: set CFLAGS=-I<your_favorite_path>
>>>
>>> The -I flag to bcd.gen should be -Iopenssl/ (it's the path prepended to 
>>> the header names in #include lines)
>>>
>>> Yeah, I know, bcd.gen isn't well documented ... if people actually use 
>>> it I may have to get back around to developing it :P
>>>
>> I was looking into using it to wrap SuperLU after looking at SuperLU's 
>> headers and realizing that the API was going to take a lot of work to 
>> wrap by hand.  However I only managed to get most of the way through 
>> installing BCD's prerequisites so far.  But I'll probably get back to it 
>> before too long.
> 
> Yeah, the prereqs almost stopped me from trying it in the first place.  First try and I got the prereqs installed, I thought, but the compile wouldn't work (I'm on windows).  Next try and half way thru I realised there was a binary package I could download to avoid all this jumping through hoops, so I took it.
> 
> Ages ago I started writing a BCD program myself, but without the foresight to use an existing compiler front end and XML as an intermediate format.  That and I thought writing a compiler might be fun, and enlightening.  I managed to write the lexer/tokenizer for C and was working on the C preprocessor when I went away to South America for 6 months.  When I got back Gregor had beaten me to it!
> 
> I think BCD is (and could be much more) hugely useful in D gaining traction, especially if you consider the huge number of C/C++ libraries we could be offering.  The web/install idea is genius, that in itself could make people switch.
> 
> Regan Heath

Where is this mythical Windows binary for BCD that you found?  Even 
searching for "D programming BCD" I still come up with mostly pages 
about binary coded decimal.

--bb



More information about the Digitalmars-d mailing list