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
error C2182 illegal use of type 'void' #358
Comments
Surely you should be able to reduce this to something more minimal? |
Does your .h file really contain all those non-ascii looking characters as displayed here in Github? |
I wonder if it is the use of If that isn't it, a cut-down reproducer would be useful. |
No response, closing |
@wsfulton Should windows.i handle I can't actually test with MSVC but simulating on Linux I get what looks like the equivalent GCC error with a small testcase:
If I add I've no idea what a purpose |
Thanks for the small reproducer @ojwb, that is what I think we were all hoping to get to the bottom of. I reproduced the error and and adding the appropriate definition from windows.h into windows.i. |
System
Windows XP + Microsoft SDKs v7.1 + Microsoft Visual Studio 10.0
.h file
.i file
Error
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
WAPIWrapperCpp_wrap.cxx
E:\Workspace\Projects\bole\bole-app\src\main\resources\swig\WAPIWrapperCpp_wrap.cxx(434) : error C2182: 'result' : illegal use of type 'void'
E:\Workspace\Projects\bole\bole-app\src\main\resources\swig\WAPIWrapperCpp_wrap.cxx(440) : error C2440: '=' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
...
The text was updated successfully, but these errors were encountered: