Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Compile issue when using Apple LLVM 5.1 - Language -> Compile Sources As -> Objective-C++ #47

Open
VaughanR0 opened this Issue May 23, 2014 · 3 comments

Comments

Projects
None yet
2 participants

For one of my projects I have a lot of C++ code which requires me to specify the Apple LLVM 5.1 - Language as 'Objective-C++' rather than leave it as 'According to file type'.
This produces two compilation errors in XpathQuery.m
XPathQuery.m:192:11: No matching function for call to 'htmlReadMemory'
XPathQuery.m:218:11: No matching function for call to 'xmlReadMemory'
where the detail is (for the first one):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/libxml2/libxml/HTMLparser.h:206:3: Candidate function not viable: cannot convert argument of incomplete type 'const void *' to 'const char *'
NB when I am able to leave the compiler setting as 'According to file type' I get no errors.

Collaborator

zadr commented May 23, 2014

What are you trying to get by compiling Hpple as ObjC++? You can mix and match Objective-C and Objective-C++ in the same project without any problem.

I am not sure that is the point. Hpple is not compiling with a valid LLVM setting even though that setting may lead to the complier using more fastidious code checking than other settings. This surely would lead one to suspect that there are some potential, if harmless, compliation issues with the code.

Collaborator

zadr commented May 23, 2014

@VaughanR0 This isn't really a matter of being more or less fastidious in your warning flags.

Hpple was written in Objective-C, not Objective-C++. They are are two different languages, that just happen to be very, very similar. That goes back to C and C++ not quite being compatible with one another, and Apple wanting to be compatible with both of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment