boost lib must provide C interface?!

Hi, can a boost C++ library be required/forced to provide a C API? Even if the library author doesn't like this idea - because he would be responsible for C stuff. <boost/config.hpp> include <cstddef> which will not be available for a C compiler - maybe this is an indication that boost libs are not required to implement a C-API. regards, Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

can a boost C++ library be required/forced to provide a C API?
No, this is a C++ library after all.
Even if the library author doesn't like this idea - because he would be responsible for C stuff.
<boost/config.hpp> include <cstddef> which will not be available for a C compiler - maybe this is an indication that boost libs are not required to implement a C-API.
Actually Boost.Config has recently be changed to support compilation in C mode, but this is very much the exception not the rule. John.

Message du 13/05/11 09:03 De : "Oliver Kowalke" A : boost@lists.boost.org Copie à : Objet : [boost] boost lib must provide C interface?!
Hi,
can a boost C++ library be required/forced to provide a C API? Even if the library author doesn't like this idea - because he would be responsible for C stuff.
include which will not be available for a C compiler - maybe this is an indication that boost libs are not required to implement a C-API.
Hi, I guess your question is about the request some reviewer did during the Context review. As I understand the request is not exactly to provide a C interface, but a C-like interface, based in functions and and POD. Note that C is a 'subset' of C++. Best, Vicente

I guess your question is about the request some reviewer did during the Context review. As I understand the request is not exactly to provide a C interface, but a C-like interface, based in functions and and POD.
I thought you insist on a C-API - maybe it was a misunderstanding
Note that C is a 'subset' of C++. C is not a exact subset of C++ - http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
best regards, Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

From: Oliver Kowalke <oliver.kowalke@gmx.de> Hi,
can a boost C++ library be required/forced to provide a C API?
As somebody who loves and uses C as well as C++ I can tell you: These languages are too different and what you asking as same as to ask from Java library to provide C++ API (even the last is simpler :-)) However if you ask if there is a good framework/set of libraries for easy C development, there are. There two big, widely deployed and uses libraries that do very fine job proving a good set of general functions: 1. GLib: threading, io, unicode, regular expression, networking, containers and more. (LGPL) 2. APR (Apache Portable Runtime) a huge set of functions like networking, memory, containers and more. (Apache license) So basically if you are looking for a set of C libraries that provide good functionality (like Boost) then these libraries are your friends. However if you looking libraries for specific tasks there are plenty: - Networking - libevent and some other friends - Threading pthread API (pthread-win32 for windows) - Regular Expressions - PCRE - Unicode - ICU - SQL - libdbi and some others - XML - libxml2 And more and more. So basically there are "Boost-for-C" libraries, they just not called Boost but rather Glib, APR :-) (And BTW some of them reacher then Boost) Artyom

Hi Artyom, sorry it was a misunderstanding with Vicente - I assumed I'm forced to provide a C-API for boost.context. It seams that only a low level API is required (but still C++). oliver -------- Original-Nachricht --------
Datum: Fri, 13 May 2011 05:50:07 -0700 (PDT) Von: Artyom <artyomtnk@yahoo.com> An: boost@lists.boost.org Betreff: Re: [boost] boost lib must provide C interface?!
From: Oliver Kowalke <oliver.kowalke@gmx.de> Hi,
can a boost C++ library be required/forced to provide a C API?
As somebody who loves and uses C as well as C++ I can tell you:
These languages are too different and what you asking as same as to ask from Java library to provide C++ API (even the last is simpler :-))
However if you ask if there is a good framework/set of libraries for easy C development, there are.
There two big, widely deployed and uses libraries that do very fine job proving a good set of general functions:
1. GLib: threading, io, unicode, regular expression, networking, containers and more. (LGPL)
2. APR (Apache Portable Runtime) a huge set of functions like networking, memory, containers and more. (Apache license)
So basically if you are looking for a set of C libraries that provide good functionality (like Boost) then these libraries are your friends.
However if you looking libraries for specific tasks there are plenty:
- Networking - libevent and some other friends - Threading pthread API (pthread-win32 for windows) - Regular Expressions - PCRE - Unicode - ICU - SQL - libdbi and some others - XML - libxml2
And more and more.
So basically there are "Boost-for-C" libraries, they just not called Boost but rather Glib, APR :-)
(And BTW some of them reacher then Boost)
Artyom _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone
participants (5)
-
Artyom
-
John Maddock
-
Max Sobolev
-
Oliver Kowalke
-
Vicente BOTET