Do you have a codeql-pack.yml
file with the codeql/cpp-all
pack as dependency?
If not, it might be easiest to set this up using the VS Code extension, see the documentation. This can also be done by using the command ">CodeQL: Create query" in VS Code.
Note that your query uses dataflow API which has been deprecated and removed in newer versions, see the changelog. So you would either have to adjust the query code to use the new API or use codeql/cpp-all: ^2.1.1
(which seems to be the last version which still contains the old dataflow API).
In the directory which contains your codeql-pack.yml
and your query file, you can then run the following commands (or use the corresponding VS Code extension commands):
codeql pack install
codeql-pack.yml
. Respectively codeql pack ci
if you have a codeql-pack.lock.yml
lock file and only want to install the versions specified in it.database analyze ... my-query.ql