- Making use of (Static) Libraries in BB

From: Treutwein Bernhard <"Treutwein>
Date: Tue, 11 Jul 2006 09:48:28 +0200

----boundary-LibPST-iamunique-1339228195_-_-
Content-type: text/plain

> > Is there an automatic way of translating these C header files into
> > BBox DLL interface modules?

>
> H2D (from XDS) or H20 (from OO2C) can help you.
>

I don't have any experiences with H2D, but I played around
recently with H2O and Swig. Both have pros & cons but could
be a solution for atomagically generating interface modules:

1. Swig http://www.swig.org/

Swig is a interface & wrapper generator for C and C++
header files. There is currently a language module for
Modula-3 interfaces, which can be adopted. I started/tried
(successfully) to derive an OberonCP language module,
which is currently not really anything more than a
rename of the Modula-3 module. Swig is written in C++
and the code is readable. Swig was primarily meant to
generate C wrappers for scripting languages. There is
a lot of documentation, many examples and a test suite ...

2. H2O is part of the OO2C compiler.

It is almost undocumented (except the short intro Stewart
gave me some time ago included below) and (ofcourse) the
complete source written in Oberon-2 (with some extensions
for OO2C like namespaces and using the OO2C libraries).
You can browse the source code here:
http://ooc.cvs.sourceforge.net/ooc/ooc2/src/H2O/
Afaik, there is no main program except TestH2O, which is
here:
http://ooc.cvs.sourceforge.net/ooc/ooc2/src/TestH2O.Mod?revision14&view=ma
rkup

I currently have problems wiht getting OO2C compiled under
MinGW and Cygwin (on different PCs), but I am working on
it (when time permits).

Summary: Both are options, both need work ...

regards
--
	Bernhard Treutwein, IuK, Ref. III A 3
	Bernhard.Treutwein(at)verwaltung uni-muenchen de
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-1339228195_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7f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1xwYXINCmhlcmU6XHBhcg0KaHR0
cDovL29vYy5jdnMuc291cmNlZm9yZ2UubmV0L29vYy9vb2MyL3NyYy9UZXN0SDJPLk1vZD9yZXZp
c2lvbj0xLjE0JnZpZXc9bWFccGFyDQpya3VwXHBhcg0KXHBhcg0KSSBjdXJyZW50bHkgaGF2ZSBw
cm9ibGVtcyB3aWh0IGdldHRpbmcgT08yQyBjb21waWxlZCB1bmRlciBccGFyDQpNaW5HVyBhbmQg
Q3lnd2luIChvbiBkaWZmZXJlbnQgUENzKSwgYnV0IEkgYW0gd29ya2luZyBvblxwYXINCml0ICh3
aGVuIHRpbWUgcGVybWl0cykuXHBhcg0KXHBhcg0KU3VtbWFyeTogQm90aCBhcmUgb3B0aW9ucywg
Ym90aCBuZWVkIHdvcmsgLi4uXHBhcg0KXHBhcg0KcmVnYXJkc1xwYXINCi0tXHBhcg0KXHRhYiBC
ZXJuaGFyZCBUcmV1dHdlaW4sIEl1SywgUmVmLiBJSUkgQSAzXHBhcg0KXHRhYiBCZXJuaGFyZC5U
cmV1dHdlaW4oYXQpdmVyd2FsdHVuZyB1bmktbXVlbmNoZW4gZGVccGFyDQpccGFyDQotLS0gQmxh
Y2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUgdG8gYmxhY2ti
b3hAb2Jlcm9uLmNofX0AbiAyLjANClJlYw=
----boundary-LibPST-iamunique-1339228195_-_---
Received on Tue Jul 11 2006 - 09:48:28 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:49 UTC