When I posted this question about trying to build a DLL and not getting one, a commenter mentioned that I was probably not exporting any symbols in the project. When I checked, I found that the project file CMake had built didn't contain the .h file for the project, so I added it. It contains the needed export declarations. Unfortunately, rebuilding still doesn't generate a DLL, and after playing around a little, I find that the compiler doesn't seem to notice the .h file at all; when I write things in there that are obviously syntactically invalid, it doesn't even break the build.
Why is the compiler ignoring the .h file after I added it to the project, and how can I get it to compile properly?