-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention that ctypesgen requires gcc #165
Comments
Also, ctypesgen should fail if gcc is missing, instead of producing a file that only contains the library loader template but no actual bindings. |
You are right, it should be mentioned also early on in the Readme file. It is, however, mentioned that a C (pre-)compiler (clang is also working just fine) is needed in https://github.com/ctypesgen/ctypesgen/wiki/Getting-Started. |
Ah, you're right, I completely forgot about the Wiki, although it's mentioned (but the projects I commonly work with don't have one). Sorry for overlooking this! |
MSVC works for me by specifying EDIT: Yes, the output is incomplete with MSVC |
However, ctypesgen always wants I've also done some search for pure-python pre-processors, but AFAICS they're not currently near enough an emulation of gcc/clang to be usable in ctypesgen. See also ned14/pcpp#85 (comment) f. |
@demberto Could you elaborate on why it fails or what is missing in the preprocessed header? (you may use |
I am no longer looking into this nor have the time to do it. (I'm out) |
OK, sorry for directing the question at you then. I rather meant, if someone has access to MSVC and time/interest to investigate, it would be nice to get some information on why it fails. But that doesn't necessarily mean I'll have time to look into it, either. |
There's no way to know which compiler would be the default compiler, there may be several installed in a machine, the gcc is the default option defined in: ctypesgen/ctypesgen/options.py Lines 12 to 19 in 17b7a25
but may be changed to whichever you like (with the |
The point is this: there may be only clang available but not gcc. In that case, it is good to dynamically select as default the one that is available. This is ctypesgen's task, not the caller's. |
It should be mentioned somewhere in the readme/description that ctypesgen needs gcc, ideally with installation instructions for the various platforms. I also find the term
pure-python
kind of misleading if gcc is involved. 1Footnotes
Although it's correct in the sense that ctypesgen itself is written entirely in Python, I feel like
pure-python
somewhat feigns "standalone" (i. e. independent of compiled binaries other than Python itself) in the current context. ↩The text was updated successfully, but these errors were encountered: