Replies: 3 comments 4 replies
-
Thanks for bringing up this subject. I'd be happy to discuss this further, e.g. based on a concrete PR. In terms of features, I would not require that wrapper to be feature complete from my side. |
Beta Was this translation helpful? Give feedback.
-
Hello @siiky, could you please provide the url of the C-repo that you are developing? |
Beta Was this translation helpful? Give feedback.
-
May be closed now as #553 has been merged. Anyone willing to provide feedback is free to do it here, on the PR, or a new issue/discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT: A C-API is now available as a "technology preview" under
wrappers/c
(see #553).Hi all,
I recently had to use ZXing in Go (which only officially supports C external libraries through CGo) and the process wasn't the most straightforward possible. After a long time of confusion, ZXing is actually extremely easy and simple to use! But I had to cut a lot of corners I would prefer not to have cut... :/
So, because of that, I would like to suggest/ask for your opinion on an "official" C API.
Basically I envision a single
.h
wrapper file that exports C names for ZXing functions, plus an accompanying.cpp
with the wrapper function bodies (or maybe a single-header-library à la stb &c would also work). Something like this:This would make the life of other people trying to use ZXing in C (or languages that only support C) much easier and more straightforward.
One difficulty is some C++ features that are "C-unfriendly", such as the
Type
enum of theError
type. I'm not very familiar with C++, so maybe it's possible, but I don't see how to define the equivalent enum in a plain C header file. This is the best I know.If there's project support, I would be interested in working on it (maybe under
wrappers/c/
?).Beta Was this translation helpful? Give feedback.
All reactions