I'm unfamiliar with the tool you use to compile, but it deals with you trying to compile calling a function that is not included/loaded.

gcc -c -o main.cpp.o CMakeFiles/try.dir/main.cpp
This will create the object without validating the link.
you would have to make sure during the linking to reference the -ldb where presumably db_create is define.