Today, I'm embarrassed by a big
In the morning, when compiling my source code is not through compiling, last Saturday also appeared this situation, at that time did not know how to make the later through the compilation, may be the original. o file without making clean is still there so that it's gone, and my code has been submitted with SVN, It's deadly (polluting the project's source code). Fortunately, I solved it immediately.
Compile error prompt:
........................
error:expected declaration specifiers or ' ... ' before ' Web_voice_var '
Scenario Description:
struct variable web_voice_var var is defined in A.C, A.h declares extern web_voice_var var. i'm B.C I want to use the value of a member of a VAR struct that has already been assigned in A.C, and then include in B.h ". /.. /a.h ", however, there was a compilation error above.
Cause Analysis:
Online search, the discussion of a lot, the more look more dazed.
Maybe the reason is
B.h # include ". /.. /a.h "while a struct or typedef in a b.h is used in a function declaration in a.h, it appears that the struct or typedef in B.H when it contains the A.H is not declared and thus caught in error.
Workaround:
will include ".. /.. /a.h "directly into the B.C, and when made again, pass