Are compact spaces characterized by "closed maps to Hausdorff spaces"? It is well known that any continuous map from a compact space to a Hausdorff space must be a closed map. Does this fact characterize compactness?
That is, if for a space $X$, every continuous map to any Hausdorff space is closed, does it imply that $X$ is compact?
My guess is no (especially since this is NOT a common result), but I can't find a counterexample.
 A: I shall try today to ask my friend Oleg Gutik,
who considered such spaces, but now for me seems the following.
Let $\mathscr{AC}$ be the class of all spaces $X$ such that every continuous map of $X$ to any Hausdorff space is closed.
The compactness of a space $X$ of the class $\mathscr{AC}$ mostly depends on separation axioms which hold for the space $X$.
Since each continuous map of an antidiscrete space to any Hausdorff space is constant and hence closed, each antidiscrete space $X$ belongs to $\mathscr{AC}$.
From the other side, each Hausdorff space $X\in\mathscr{AC}$ is $H$-closed, that is $X$ is a closed subspace of any Hausdorff space.
In particular, since each Tychonoff space is dense in its compactification, we see that a Tychonoff space $X$ belongs to $\mathscr{AC}$ iff $X$ is compact.
Moreover, there is the following well-known characterization of $H$-closed spaces: a Hausdorff space $X$ is $H$-closed iff each open cover of $X$ has a finite subfamily such that the union of the closures of its members covers the space $X$. This characterization implies that each regular $H$-closed space is compact.
Update. So, I spoke with Oleg and I have to tell the following.
In my Russian version of Ryszard Engelking’s “General topology” there is a section
devoted to $H$-closed and $H$-minimal spaces, containing Exercise 3.12.5. It contains four equivalent conditions characterizing $H$-closed Hausdorff spaces. Moreover, each Hausdorff continuous image of a Hausdorff $H$-closed space is $H$-closed again (I suggest that this result can be easily proved from the characterization of Hausdorff $H$-closed spaces, which I write above).
There is the following well-known example of a Hausdorff non-regular and non-compact $H$- closed space $X$. Let $X$ be the unit interval $[0,1]$  where each non-zero point has a base from standard topology of the unit interval $[0;1]$ and the zero has a base consisting of its open neighborhoods in the standard topology without the converging to zero sequence $\{1/n: n\in\mathbb N\}$. The covering criterion of $H$-closedness which I wrote above implies that  the space $X$ is $H$-closed.
At last, there exists a $T_1$ space $X$ such that any continuous image of $X$ into a Hausdorff space in constant, so $X\in\mathscr{AC}$. Put $X=\mathbb Z$ and a neighborhood base at the point $n\in X$ is $\{\{n\}\cup [m,\infty)\cap\mathbb Z:m\in\mathbb Z\}$. Then every two non-empty open subsets of the space $X$ have a non-empty intersection, hence each map of $X$ into a Hausdorff space should be constant.
Update 2. But, as Cronus suggested, closedness of all continuous images of a Hausdorff space $X$ is a formally weaker condition that every map from $X$ into to Hausdorff space is a closed map.
So I started to look for such a non-compact space $X$. Since such space is $H$-minimal (that is every one-to-one continuous mapping of $X$ onto a Hausdorff space is a homeomorphism), first I checked Exercise 3.12.5.e from [Eng] on such spaces. There were references [Par], [Kat] and [BPS]. The task of the exercise is to give an example of an $H$-minimal space which is not compact and prove that a Hausdorff space $X$ is $H$-minimal iff $X$ is semiregular and $H$-closed. I recall that a Hausdorff space is semiregular, if it has a base constising of regular open sets, that is sets $U$ with $U=\operatorname{int}\overline{U}$. Note that each $H$-minimal space is semiregular, because of a hint pointing to a construction of a semiregularization $X_{sr}$ of a space $X$, considered by Stone [Sto] and Katětov [Kat$_2$], by endowing the set $X$ with a topology generating by the base consisting of all regular open sets of the space $X$. It is easy to show that if the space $X$ is Hausdorff then the space $X_{sr}$ is semiregular and has the same regular open sets as the space $X$.
Next I looked the paper [Par] and bound no examples of  $H$-minimal non-compact spaces. Since I don’t know German, I skipped the paper [Kat] and looked at [BPS]. There was mentioned, that Katětov [Kat] was the first to characterize minimal Hausdorff spaces, and he proved that a Urysohn space is minimal Hausdorff iff it is compact. I recall that a space is Urysohn iff each two distinct points of it have disjoint closed neighborhoods. Urysohn in [Ury] also constructed an example of a noncompact minimal Hausdorff space. Since I don’t know German, I skipped the paper [Ury] too.
But we can construct a semiregual $H$-closed Hausdorff space $X$ as follows. Let $X=[0,1)$ with two distinct attached points $1$ and $1’$. Define a base of the topology of $X$ as follows. Each point $x\in (0,1]$ has a usual base, the point $0$ has a base $\{U_n:n\in\Bbb N\}$ and the point $0’$ has a base $\{U’_n:n\in\Bbb N\}$, where $U_n=\bigcup_{i=n}^{\infty} \left(\tfrac 1{2i+1}, \tfrac 1{2i}\right)$ and $U’_n=\bigcup_{i=n}^{\infty} \left(\tfrac 1{2i}, \tfrac 1{2i-1}\right )$ for each natural $n$. It is easy to see that the space $X$ is semiregular, but, since the points $0$ and $0’$ have no disjoint closed neighborhoods, the space $X$ is not Urysohn. Also $X\not\in\mathscr{AC}$, because a map $f$ from $X$ to $[0,1]$ with the usual topology such that $f(0)=f(0’)=0$ and $f(x)=x$ for each $x\in (0,1])$ is continuous, but not closed.
References
[BPS] M.P. Berri, J.R. Porter,  R.M. Stephenson, Jr. A survey of minimal topological spaces,  General Topology and Its Relations to Modern Analysis and Algebra, Publisher: Academia Publishing House of the Czechoslovak Academy of Sciences (Praha), (1971), 93–114.
[Eng]  Ryszard Engelking, General Topology, 2nd ed., Heldermann, Berlin, 1989.
[Kat] M. Katětov, Über H-abgeschlossene und bikompakte Räume, Časopis Pěst. Mat. Fys. 69 (1940), 36–49.
[Kat$_2$] M. Katětov, On H-closed extensions of topological spaces, Časopis Pěst. Mat. Fys. 72 (1947), 17–32.
[Par] A.S. Parhomenko, On one-to-one continuous mappings, Mat. Sb. (N.S.) 5 (47) (1939), 197-210.
[Sto] M.H. Stone, Applications of the theory of Boolean rings to general topology, Trans. Amer. Math. Soc. 41 (1937), 375–481.
[Ury] P. Urysohn, Über die Machtigkeit der zusammenhängenden Mengen, Math. Ann. 94 (1925), 262–295.
A: Let $\tau=\{\varnothing\}\cup\{U\subseteq\Bbb N:0\in U\}$; then $\langle\Bbb N,\tau\rangle$ is not compact, but every continuous map $f$ from $X$ to a Hausdorff space is constant: $f[\Bbb N]=\{f(0)\}$. (I’m still thinking about the case in which $X$ has more than $T_0$ separation.)
