Some problems about creating my first msg

I don’t think that the warning and the error are related. The warning is about a CMake policy that is not set. See the documentation for an explanation. This is only a warning. To write your first message, you can follow this tutorial. Take a close look at the CMakeLists.txt part of the tutorial.