[cfe-dev] example does not compile, look like a bug

mats petersson mats at planetcatfish.com
Thu Apr 30 12:24:33 PDT 2015


Clang and LLVM does not guarantee that "everything is compatible from one
release to another". In fact, you can almost guarantee that anything
reasonably complex will NOT be compatible.

So, if try to build an old example, that is written for 3.4, with a 3.6
compiler installation, it won't compile.

This is "by design" in the sense that keeping compatibility between
releases is a lot of hard work, especially if you actually wish to improve
the product between one release and the next.

There are three ways to solve your problem:
1. Find an updated example that matches the compiler you are using.
2. Get the older version of compiler and build against that instead of the
latest release.
3. Fix the code that has become out of date. This will not only solve the
problem, but you are likely to learn how things work better - but sometimes
it's not trivial.

(If the problem is that a header can't be found, then you probably simply
need to update the -I option for the build)

--
Mats

On 30 April 2015 at 19:58, <equinox at atw.hu> wrote:

> On 4/30/2015 4:33 PM, Csaba Raduly wrote:
>
>> On Thu, Apr 30, 2015 at 10:20 AM,  equinox wrote:
>>
>>> On 4/30/2015 12:58 AM, Anton Korobeynikov wrote:
>>>
>> (snipped)
>>
>>> Thanks you for trying to help.
>>> This problem is located in clang headers , not in the  code as I see it.
>>> It implies clang 3.6.0 was released with faulty headers?????
>>>
>>> Marton
>>>
>> Unlikely.
>>
>> The tutorial code was written for the clang 3.4.0 headers. The clang
>> headers have changed since the 3.4.0 release, but the tutorial code
>> was not updated.
>>
>> Csaba
>>
> It is not clear what you mean that headers "changed"...
> I downloaded 3.6.0 headers from the official site as a part of clang
> source package.
> #include "clang/AST/ASTContext.h"
> This is the line causing the error. This seems to be a valid header.
> I can find it in the documentation.
>
> Marton
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150430/e7a63627/attachment.html>


More information about the cfe-dev mailing list