2

I have a declaration like this:

extern "C++" CHARSET_INFO compiled_charsets[];

which compiled fine so far, but now with the update to XCode 5.1 I get an error for that:

.../my_sys.h:277:27: Definition of variable with array type needs an explicit size or an initializer

It's certainly just a newly enabled LLVM check, but I'm curious to know how you would cope with such an error in general, especially if that is in a 3rd party header file you can't change. But also if you could change it what would it look like? I mean, how can I initialize an external array? It's defined somewhere else. It makes no sense to initialize the external reference.

4

1 回答 1

0

自己找到了解决方案。不知道为什么 LLVM 会遇到问题,但删除“C++”部分使其再次编译该代码:

extern CHARSET_INFO compiled_charsets[];
于 2014-03-11T11:35:46.670 回答