-
Notifications
You must be signed in to change notification settings - Fork 37
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
va_list missing import #34
Comments
Currently there's a hardcoded list of C header files that dstep knows how to map to D files. The problem is there's a big chance a given symbol is not actually defined in any of these files but instead is defined in an internal header file, which will be different for different compilers and platforms. Then the internal files is included in one of the standard C header files. I can take a look at this particular case. Do you have a code example I can use? |
I don't seem to be able to recreate it with simple cases. Both of these work. #include <stdarg.h>
void function(va_list args); and #include <stdarg.h>
struct Example {
int (*Ex)(va_list args);
}; When running either of the above, I get the correct import import core.stdc.stdarg; however when running on a real file, I do not get that import. The actual file I'm trying to do is jni.h. Not sure if that's the exact same file. Mine is from OpenJDK 1.7.0_65. If you look at the JNINativeInterface_ struct, that is where all the va_list references are. |
I noticed that if I use an old version of libclang it will not have the file information of where So I guess it depends on which version of libclang you're using. Then one which worked for me was the one included in Xcode 6.1.1. That is |
When there are va_list references in the .h file... you need to import core.stdc.stdarg in the resulting d file.
This may have moved at some point... as I get a superfluous import core.stdc.stdio;
The text was updated successfully, but these errors were encountered: