Question: I have a C++ solution in which there is a global variable which I want to be accessible across projects in the solution file. I know this is not recommended but what is the best way to do this?

Answer: 
Define the variable once, in the file that originally has the global variable and declare the variable `extern` in every file that uses it.

File 1:

```
int GlobalVariable;

int main(int argc, char *argv[]) {
    // blablabla
}

```

File 2:

```
extern int GlobalVariable;

int somefunc(void) {
    // blablabla
}

```

File 3:

```
extern int GlobalVariable;

// blablabla

```
There is a difference between Translation Unit and Project (specifically in Visual Studio).

In C and C++ you can make a global variable only accessible from the file in which it's declared by using the static keyword in front of the declaration. Globals that don't use the static keyword are accessible from any C or C++ file compiled into the program.

But frankly your question is not clear. When you say `Global` there can be lots of perspectives to it, as Wikipedia says in the article on [Global Variables](http://en.wikipedia.org/wiki/Global_variable):

*The C language does not use the term global, though in a small program contained in a single file it is possible to get the same effect by declaring a variable outside all functions (see below). However, such a variable should be called external, not global, since its scope is limited to the single file.*

But, you may go through these links to see if you can solve the your specific problem:

[Global variables/functions across different projects](http://www.tek-tips.com/viewthread.cfm?qid=1150862&page=56)

[Shared global variable in C++ static library](https://stackoverflow.com/questions/3186926/shared-global-variable-in-c-static-library)

[How to implement process-global variable in C++](https://stackoverflow.com/questions/669989/how-to-implement-process-global-variable-in-c)