How to declare global variable in C?

/* a.h */
extern int globali;  /* Declaration for compilation */
/* Visible here */

Later make sure you define in (exactly) one of the compilation units.

/* something.c */
int globali = 42;  /* Definition for linking */

Use extern before using that variable in the install.c. After that compile the both the files at same time.

extern cl_platform_id platformID;

Add one line

extern cl_platform_id platformID;

before referring to platformID in install.c.