$\mathbb R$, of cardinality $|\mathbb R|=2^{\aleph_0}$ is not weakly compact.
So there is a function $f$ from $[{\mathbb R}]^2$ (the subsets of $\mathbb R$ of size 2) to $\{0,1\}$ such that there is no $X\subset \mathbb R$ of cardinality $|\mathbb R|$, such that $f$ is constant on $[X]^2$.
I know, by the infinite Ramsey's theorem that there is no such function if I use $\mathbb N$ instead of $\mathbb R$, but how do you build such a function $f$ for $\mathbb R$ ?
Note that being weakly compact is not synonymous with "having the tree property", but rather it is synonymous with "having the tree property and being inaccessible". Note that $2^{\aleph_0}$ is never a strong limit cardinal, so the latter must fail and $2^{\aleph_0}$ cannot be a weakly compact cardinal.
The continuum can be almost weakly compact, though, meaning it may still have the tree property. This, of course, requires the consistency strength of a weakly compact cardinal to begin with. Of course this means that $2^{\aleph_0}>\aleph_1$, since $\sf ZFC$ proves that $\aleph_1$ doesn't have the tree property.
You can find references in both these papers: