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
Perl interface cannot use strawberry perl #328
Comments
|
Original comment by |
You did not specify what compiler you are using. I'm seeing this issue when using Visual Studio and attempting to compile with Strawberry Perl:
It looks like older Visual Studio compilers simply do not support stdbool. So maybe this is a compiler issue, and the solution is to use a different compiler (e.g. MinGW)? Alternatively, Vim could provide a stdbool for use with the Visual Studio builds (and only the Visual Studio builds). |
I have worked around the compiler issue in the meantime, by editing my personal build script that wraps Vim's make and install, to create a temporary stdbool.h in the src directory before building, and delete it afterward. This lets Vim compile, and |
I think using the same compiler that Strawberry Perl was built with is the right choice. There are various build-time decisions made based on the compiler which, as we see here, affect code trying to embed Perl. Adding a stub for a system header to Vim doesn't sound right. |
I think updating Visual Studio to 2013 or later is a easy way in this case. Another option is patching config.h in the perl directory: --- lib/CORE/config.h.orig 2014-06-06 22:36:37.584537600 +0900
+++ lib/CORE/config.h 2014-06-07 18:26:35.765691900 +0900
@@ -4290,7 +4290,7 @@
* This symbol, if defined, indicates that <stdbool.h> exists and
* can be included.
*/
-#define I_STDBOOL /**/
+/*#define I_STDBOOL / **/
/* I_SUNMATH:
* This symbol, if defined, indicates that <sunmath.h> exists and |
I suggest to put |
Ouch. I tried again with ActiveState Perl (64-bit), and that also fails to find stdbool.h. And not everyone can upgrade their Visual Studio. So something needs doing for this on the Vim side I think. I don't like win32/stdbool.h as a solution; isn't that also used by MinGW builds which presumably don't have this problem? At least ActiveState doesn't crash Vim when trying to use the Perl interface after the "create a stdbool" workaround. |
An empty #define bool char but I don't like this.
Then he/she should patch |
On Wed, Sep 16, 2015 at 12:52 PM, K.Takata notifications@github.com wrote:
OK, I broke down and tried the suggested patch to Perl's config.h file. It worked (for both ActiveState AND Strawberry)! As in, not only does it The other workarounds (defining a stdbool of some kind) create a Perl Is there anything Vim can do about this? Maybe just putting it in the help |
Most of users, or distributors aren't know/understand why the patching is required. This is a way to avoid to modify header file in perl. |
I suppose you might define Note:
|
OK, I wrote a patch based on the mattn's idea. |
Original issue reported on code.google.com by
universe...@gmail.com
on 10 Feb 2015 at 7:56The text was updated successfully, but these errors were encountered: