Replace the using of $(pgk-config ....) with a txt file while compiling g++

I've installed OpenCV on a new Ubunty OS. I'm new to g++ compiler. When I have to compile the code i usually do:

g++ program.cpp -o program_name $(pkg-config --cflags --libs opencv)

What i'm trying to do is to avoid writing the $(...) because it gives always the same result. I was looking for something like this:

g++ program.cpp -o program_name "pkg.txt"

pkg.txt is a text file in which is written the output of $(pkg-config --cflags --libs opencv) but I was not able to find any solution yet

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum