In the previous period of time work to compile cross-platform third-party libraries for Android, encountered Arc4random about the function of the "static Declaration follows Non-static declaration" problem, That's because the NDK provides a runtime that is not the same for arc4random support, or supports only some other functions or only other functions, whereas the automatic configuration script of a third-party library meets either full support or no support, providing a statically implemented code. This is where the function declares the static in the implementation code after it is declared in the runtime header file. The solution can only be manually modified for each CPU system version.
Today in compiling the OpenSSL 0.98b version also encountered this error, this time is a variable. Here's what this culprit is:
Openssl_implement_global.
It wants to hide variable name variables into static, export an access function, and use the macro to initialize the variable, the end of the macro is not ";" The enclosing statement.
Openssl_implement_global (int, some_var) = 1; Did you get it?
However, an explicit extern declaration is made, then referenced, and finally static is defined and initialized.
No IDE Analysis project, looking for a macro is really not easy to find, compile error, and will not be prompted to define the macro there, just pointing to the macro error, you do not know what the macro is intended. Although you can traverse the directory to find matching words from the file.
Static declaration follows Non-static declaration