Compilation error on scalar.h
Hi.
I am trying to compile your project, and get an error: blib\headers/perl++/scalar.h:185: error: expected identifier before 'void' blib\headers/perl++/scalar.h:185: error: expected '}' before 'void' blib\headers/perl++/scalar.h:185: error: expected unqualified-id before ',' token blib\headers/perl++/scalar.h:185: error: two or more data types in declaration of 'SCALAR' blib\headers/perl++/scalar.h:185: error: expected initializer before '}' token
line 185 is: enum context {VOID, SCALAR, LIST};
I am using Strewberry Perl 5.12 on Windows with MingW. I tried, but could not spot the problem. maybe my C++ is out of shape...
Thanks, Shmuel.
I tested a weird idea that the compiler identify VOID==void. so I changed it to VXOID, and the error disappeared. weird.
oh, and I'm using Boost 1.44.0
Windows has a nasty habit of defining various types like these. VOID is one of them (for a more complete list, see http://msdn.microsoft.com/en-us/library/aa383751%28VS.85%29.aspx). Making it compile on windows requires some #undefing. I've been working on it, but the library isn't quite functional yet on Windows.
Hi Leont.
Thank for clearing it out. I saw your presentation on YAPC::EU::2010, and want to give a presentation at work about it, so I'm willing to invest time in making it compile.
Here are a few notes that I collected so far:
The followinf statment is missing from Evaluate.C (on the beginning of the file) #include "internal.h"
In Glob.C, line 8 and 11: remove the const from the reinterpret_cast
helpers.C, line 22 and 34: we don't have to MIN the lenghts, after we established that they are equal. (and MIN is not declared anyway)
For some reason the build process creates the 'o' (object) files in 'perl++\source' and then search for them in '_build'.
tab++.C is missing (for the 'exit' call): #include <cstdlib>
now I'm stuck on the dll-building stage, with error msg: undefined reference to `boot_libperl__'
That's it for now. what do you think?
btw, will you be on YAPC::Asia this year?
Shmuel.
Hi Shmuel,
Thanks for all the feedback, it's really helpful.
- evalutate.c: The include is missing deliberately. It doesn't need it and it would only slow down compilation.
- glob.C: Will change
- helpers.C: Doh!
- Build problem: It's a known bug in ExtUtils::CBuilder on Windows. I sent dagolden a patch, but it hasn't hit the stable release of EU::CB yet.
- tap++.C: Will fix.
- Linking problem: I know about it, that's where I got stuck. I now understand what causes the problem, and what core module needs to be fixed (that did take some time), but that also means the linking needs a lot more love to work on Windows. It's one of my two focus points right now (the other being the documentation) but I'm not there yet.
No, I won't be at YAPC::Asia. Right now I have neither money nor time for such a trip.
Again, thanks your feedback. I hope I can fix the linking issue soon.
Leon
Hi Leon.
about evaluate.c: it does uses IV/NV types. so if you don't include internal.h, were are these types declared?
And about YAPC::Asia, I'm thinking about giving a talk about C-Perl binding, the include Libperl++ as 'future directions'. (also Ctypes and XSpp) Is that OK with you? If it is, can I send you the presentation (when it will be finished) to make sure I don't have major mistakes?
Thanks, Shmuel.
Erm, evaluate.C doesn't use IV/NV types, it just declares a string that will be evaluated by the interpreter.
Yes, by all means include libperl++ in your talk. I'd be happy to assist you with the slides for that part
true. however, it includes perl++.h, that includes scalar.h, that mentions IV/NV. (in line 67)
Also, is there a place in this project where I can contribute? some functions on your low priority list that need to be implemented?
I now understand what you meant with the evaluate.C problem. IV/NV and friends should be defined in config.h, but that is empty on Windows for some reason. I'm going to look into it, but it sure is a strange regression.